File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const cannotUseCache = [
33
33
34
34
// Skip modules that cannot be required when they are not
35
35
// built into the binary.
36
- if ( hasInspector ) {
36
+ if ( ! hasInspector ) {
37
37
cannotUseCache . push (
38
38
'inspector' ,
39
39
'internal/util/inspector' ,
Original file line number Diff line number Diff line change @@ -51,12 +51,13 @@ function disableAllAsyncHooks() {
51
51
exports . writeCoverage = writeCoverage ;
52
52
53
53
function setup ( ) {
54
- const { Connection } = internalBinding ( 'inspector ' ) ;
55
- if ( ! Connection ) {
54
+ const { hasInspector } = internalBinding ( 'config ' ) ;
55
+ if ( ! hasInspector ) {
56
56
process . _rawDebug ( 'inspector not enabled' ) ;
57
57
return ;
58
58
}
59
59
60
+ const { Connection } = internalBinding ( 'inspector' ) ;
60
61
coverageConnection = new Connection ( ( res ) => {
61
62
if ( coverageConnection . _coverageCallback ) {
62
63
coverageConnection . _coverageCallback ( res ) ;
You can’t perform that action at this time.
0 commit comments