Skip to content

Commit

Permalink
Fix CI error
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 7, 2022
1 parent 0a21a22 commit 7da1c0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/babel-traverse/src/scope/binding.ts
Expand Up @@ -44,7 +44,11 @@ export default class Binding {
this.path = path;
this.kind = kind;

if ((kind === "var" || kind === "hoisted") && isDeclaredInLoop(path)) {
if (
(kind === "var" || kind === "hoisted") &&
path &&
isDeclaredInLoop(path)
) {
this.reassign(path);
}

Expand Down

0 comments on commit 7da1c0a

Please sign in to comment.