From 6b0c9151e89aa22ddacce1dd3111b46732bb1cde Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Fri, 24 Nov 2023 20:27:01 +0000 Subject: [PATCH] Reduce redundant operations [refactor] --- lib/instrument/visitors/eval.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/instrument/visitors/eval.js b/lib/instrument/visitors/eval.js index 514e1df8..e28bd7ae 100644 --- a/lib/instrument/visitors/eval.js +++ b/lib/instrument/visitors/eval.js @@ -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; }