Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2b0645

Browse filesBrowse files
joyeecheungBridgeAR
authored andcommitted
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
Copy full SHA for b2b0645

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎lib/console.js‎

Copy file name to clipboardExpand all lines: lib/console.js
+2-1Lines changed: 2 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.