Skip to content

Commit 994ee18

Browse files
authored
🐛 #12 by not resolving static value of Symbol() (#13)
1 parent 9a5c4fb commit 994ee18

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/get-static-value.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ const callAllowed = new Set(
101101
String.fromCharCode,
102102
String.fromCodePoint,
103103
String.raw,
104-
Symbol,
105104
Symbol.for,
106105
Symbol.keyFor,
107106
unescape,

test/get-static-value.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ describe("The 'getStaticValue' function", () => {
7474
expected: { value: Symbol.iterator },
7575
},
7676
{ code: "Symbol[iterator]", expected: null },
77+
{
78+
code: "const symbol = Symbol(); (symbol === symbol)",
79+
expected: null,
80+
},
7781
{ code: "Object.freeze", expected: { value: Object.freeze } },
7882
{ code: "Object.xxx", expected: { value: undefined } },
7983
{ code: "new Array(2)", expected: null },

0 commit comments

Comments
 (0)