Skip to content

Commit b2b0645

Browse files
joyeecheungBridgeAR
authored andcommittedJan 9, 2019
console: create the global console from Console constructor
Specifically for v11.x. PR-URL: #25420 Refs: #23509 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 73c3a3d commit b2b0645

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/console.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@ function noop() {}
487487
// we cannot actually use `new Console` to construct the global console.
488488
// Therefore, the console.Console.prototype is not
489489
// in the global console prototype chain anymore.
490-
const globalConsole = Object.create({});
490+
// This is only here for v11.x conflict resolution.
491+
const globalConsole = Object.create(Console.prototype);
491492
const tempConsole = new Console({
492493
stdout: process.stdout,
493494
stderr: process.stderr

0 commit comments

Comments
 (0)