Skip to content

Commit

Permalink
console: create the global console from Console constructor
Browse files Browse the repository at this point in the history
Specifically for v11.x.

PR-URL: #25420
Refs: #23509
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
joyeecheung authored and BridgeAR committed Jan 9, 2019
1 parent 73c3a3d commit b2b0645
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ function noop() {}
// we cannot actually use `new Console` to construct the global console.
// Therefore, the console.Console.prototype is not
// in the global console prototype chain anymore.
const globalConsole = Object.create({});
// This is only here for v11.x conflict resolution.
const globalConsole = Object.create(Console.prototype);
const tempConsole = new Console({
stdout: process.stdout,
stderr: process.stderr
Expand Down

0 comments on commit b2b0645

Please sign in to comment.