fix(cli/console): enclose symbol keys in brackets (#7642)

This encloses symbol keys when used in objects with brackets (e.g
[Symbol("Symbol.iterator")]).
This commit is contained in:
Casper Beyer 2020-09-23 19:58:28 +08:00 committed by GitHub
parent 29dd62b08c
commit d68fb81342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 13 deletions

View file

@ -747,7 +747,7 @@
}
for (const key of symbolKeys) {
entries.push(
`${maybeQuoteSymbol(key)}: ${
`[${maybeQuoteSymbol(key)}]: ${
inspectValueWithQuotes(
value[key],
ctx,