inspector: fix console with inspector disabled

PR-URL: https://github.com/nodejs/node/pull/14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
Timothy Gu committed 2017-08-05 16:40:41 +08:00
1 parent 365b2e3424
commit 17547c4762
1 file changed
+3
+3
View File
@@ -287,6 +287,9 @@
function installInspectorConsole(globalConsole) {
const wrappedConsole = NativeModule.require('console');
const inspector = process.binding('inspector');
if (!inspector.consoleCall) {
return wrappedConsole;
}
const config = {};
for (const key of Object.keys(wrappedConsole)) {
if (!globalConsole.hasOwnProperty(key))