| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1022d3d commit 80af610
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1718,6 +1718,8 @@ function formatProperty(ctx, value, recurseTimes, key, type, desc, | |||
| 1718 | 1718 | strEscapeSequencesReplacer, escapeFn | |
| 1719 | 1719 | ); | |
| 1720 | 1720 | name = `[${ctx.stylize(tmp, 'symbol')}]`; | |
| 1721 | + } else if (key === '__proto__') { | ||
| 1722 | + name = "['__proto__']"; | ||
| 1721 | 1723 | } else if (desc.enumerable === false) { | |
| 1722 | 1724 | const tmp = StringPrototypeReplace(key, | |
| 1723 | 1725 | strEscapeSequencesReplacer, escapeFn); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3095,3 +3095,10 @@ assert.strictEqual( | |||
| 3095 | 3095 | ']' | |
| 3096 | 3096 | ); | |
| 3097 | 3097 | } | |
| 3098 | + | ||
| 3099 | + { | ||
| 3100 | + assert.strictEqual( | ||
| 3101 | + util.inspect({ ['__proto__']: { a: 1 } }), | ||
| 3102 | + "{ ['__proto__']: { a: 1 } }" | ||
| 3103 | + ); | ||
| 3104 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments