Skip to content

Commit

Permalink
fix a check of the evaluatedValue
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzoferre committed Sep 20, 2024
1 parent 28b2ef4 commit 7405d20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/techniques/dynamics/evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function (babel) {
if (!name || context[name] === undefined) return;
const expressionCode = generate(node).code;
const evaluatedValue = vm.runInContext(expressionCode, context);
if (evaluatedValue && typeof evaluatedValue !== "function") {
if (evaluatedValue !== undefined && typeof evaluatedValue !== "function") {
const { scope } = path;
const binding = scope.getBinding(name);
if (!binding) return;
Expand Down

0 comments on commit 7405d20

Please sign in to comment.