diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js index 20b038bae8791d..b11f5901a1769c 100644 --- a/lib/internal/bootstrap_node.js +++ b/lib/internal/bootstrap_node.js @@ -321,10 +321,8 @@ const wrappedConsole = NativeModule.require('console'); Object.defineProperty(global, 'console', { configurable: true, - enumerable: true, - get() { - return wrappedConsole; - } + enumerable: false, + value: wrappedConsole }); setupInspector(originalConsole, wrappedConsole, Module); } diff --git a/test/message/console_low_stack_space.js b/test/message/console_low_stack_space.js index 6b4ae8f479c804..9128eb49d120e0 100644 --- a/test/message/console_low_stack_space.js +++ b/test/message/console_low_stack_space.js @@ -16,7 +16,7 @@ function a() { try { return a(); } catch (e) { - compiledConsole = consoleDescriptor.get(); + compiledConsole = consoleDescriptor.value; if (compiledConsole.log) { // Using `console.log` itself might not succeed yet, but the code for it // has been compiled.