Skip to content

Commit

Permalink
Don't add binding to function twice when var binding shares with fu…
Browse files Browse the repository at this point in the history
…nction param [fix]
  • Loading branch information
overlookmotel committed Nov 22, 2023
1 parent b89a9f9 commit 4779692
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/instrument/visitors/assignee.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,8 @@ function IdentifierVar(node, state) {
binding.isVar = true;
} else {
binding = createBinding(block, varName, {isVar: true}, state);
if (fn) fn.bindings.push(binding);
}

if (fn) fn.bindings.push(binding);
} else if (binding.isFrozenName) {
return;
}
Expand Down

0 comments on commit 4779692

Please sign in to comment.