summaryrefslogtreecommitdiff
path: root/lib/internal/modules/cjs/helpers.js
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-03-21 08:17:01 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-23 08:55:15 +0100
commita6f3e8f3fe653c48a48c877feec1c24306c3248e (patch)
tree69460190478aaa23d386049de906ba7d1aa0d8ca /lib/internal/modules/cjs/helpers.js
parentc6c957d3cc3de335a0ccc25506d570b0a237a0ce (diff)
downloadandroid-node-v8-a6f3e8f3fe653c48a48c877feec1c24306c3248e.tar.gz
android-node-v8-a6f3e8f3fe653c48a48c877feec1c24306c3248e.tar.bz2
android-node-v8-a6f3e8f3fe653c48a48c877feec1c24306c3248e.zip
repl: fix tab completion of inspector module
Correctly check for the presence of the inspector module before adding it to the builtin libs list. PR-URL: https://github.com/nodejs/node/pull/19505 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/modules/cjs/helpers.js')
-rw-r--r--lib/internal/modules/cjs/helpers.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/modules/cjs/helpers.js b/lib/internal/modules/cjs/helpers.js
index 61565cc593..fdad580b3b 100644
--- a/lib/internal/modules/cjs/helpers.js
+++ b/lib/internal/modules/cjs/helpers.js
@@ -104,7 +104,7 @@ const builtinLibs = [
'stream', 'string_decoder', 'tls', 'tty', 'url', 'util', 'v8', 'vm', 'zlib'
];
-if (typeof process.binding('inspector').connect === 'function') {
+if (typeof process.binding('inspector').open === 'function') {
builtinLibs.push('inspector');
builtinLibs.sort();
}