Skip to content

Commit

Permalink
Handle Symbol.unscopables
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Dec 17, 2023
1 parent 8c2ece0 commit 1921ca4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/init/with.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ const shimmedDefineSetter = {
return getIsGettingScope() || key.startsWith(internalVarsPrefix);
},
get(target, key) {
return key === 'eval' ? getEval() : runEval(nativeEval, key);
if (key === Symbol.unscopables) return undefined;
if (key === 'eval') return getEval();
return runEval(nativeEval, key);
},
set(target, key, value) {
// Only used for setting internal temp vars, so no need to handle if key is `v` or `eval`
Expand Down

0 comments on commit 1921ca4

Please sign in to comment.