Skip to content

Commit b249b07

Browse files
committed
fixup! src: use internalBinding('config').hasInspector in JS land
1 parent ac1a309 commit b249b07

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/internal/bootstrap/cache.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const cannotUseCache = [
3333

3434
// Skip modules that cannot be required when they are not
3535
// built into the binary.
36-
if (hasInspector) {
36+
if (!hasInspector) {
3737
cannotUseCache.push(
3838
'inspector',
3939
'internal/util/inspector',

lib/internal/process/coverage.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ function disableAllAsyncHooks() {
5151
exports.writeCoverage = writeCoverage;
5252

5353
function setup() {
54-
const { Connection } = internalBinding('inspector');
55-
if (!Connection) {
54+
const { hasInspector } = internalBinding('config');
55+
if (!hasInspector) {
5656
process._rawDebug('inspector not enabled');
5757
return;
5858
}
5959

60+
const { Connection } = internalBinding('inspector');
6061
coverageConnection = new Connection((res) => {
6162
if (coverageConnection._coverageCallback) {
6263
coverageConnection._coverageCallback(res);

0 commit comments

Comments
 (0)