From 4681c0682847f6514511e066e05c6d8c96ae3cb5 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Mon, 13 Nov 2023 13:40:10 +0000 Subject: [PATCH] fix 3 --- lib/instrument/visitors/eval.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/instrument/visitors/eval.js b/lib/instrument/visitors/eval.js index 8214d1d0..a5c1fcff 100644 --- a/lib/instrument/visitors/eval.js +++ b/lib/instrument/visitors/eval.js @@ -141,9 +141,9 @@ function instrumentEvalCall(callNode, block, fn, isStrict, canUseSuper, state) { varDefsNodes.push(t.arrayExpression(varDefNodes)); // If var is external to function, record function as using this var. - // Ignore `new.target` as it's not possible to recreate. + // Ignore `new.target` and `super` as they're not possible to recreate. // https://github.com/overlookmotel/livepack/issues/448 - if (blockIsExternalToFunction && varName !== 'new.target') { + if (blockIsExternalToFunction && varName !== 'new.target' && varName !== 'super') { activateBinding(binding, varName); const externalVar = getOrCreateExternalVar(externalVars, block, varName, binding); externalVar.isReadFrom = true;