Skip to content

Commit

Permalink
Reduce redundant operations [refactor]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Nov 24, 2023
1 parent 6308e72 commit 6b0c915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/instrument/visitors/eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function instrumentEvalCall(callNode, block, fn, isStrict, canUseSuper, superIsP
// as frozen anyway, to indicate that replacement var name should be prefixed with `_`.
// Frozen `new.target` is not currently supported.
// https://github.com/overlookmotel/livepack/issues/448
if (varName !== 'this') {
if (varName !== 'this' && !binding.isFrozenName) {
binding.isFrozenName = true;
binding.trails.length = 0;
}
Expand Down

0 comments on commit 6b0c915

Please sign in to comment.