Skip to content

Commit

Permalink
console: fix logging symbol primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Mar 9, 2023
1 parent 645e1be commit 6439949
Show file tree
Hide file tree
Showing 2 changed files with 6,490 additions and 6,480 deletions.
10 changes: 8 additions & 2 deletions patches/util+0.12.5.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/util/util.js b/node_modules/util/util.js
index 6db393e..a2d8cd4 100644
index 6db393e..c15bfbc 100644
--- a/node_modules/util/util.js
+++ b/node_modules/util/util.js
@@ -106,7 +106,7 @@ exports.deprecate = function(fn, msg) {
Expand All @@ -11,7 +11,13 @@ index 6db393e..a2d8cd4 100644
var debugEnv = process.env.NODE_DEBUG;
debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&')
.replace(/\*/g, '.*')
@@ -358,7 +358,7 @@ function formatPrimitive(ctx, value) {
@@ -354,11 +354,13 @@ function formatPrimitive(ctx, value) {
// For some reason typeof null is "object", so special case here.
if (isNull(value))
return ctx.stylize('null', 'null');
+ if (isSymbol(value))
+ return ctx.stylize(value.toString(), 'symbol');
}


function formatError(value) {
Expand Down
Loading

0 comments on commit 6439949

Please sign in to comment.