Skip to content

Commit 5ceaa5e

Browse files
authored
fix: Avoid crash in isRemoved (#219) (#234)
1 parent 80a6277 commit 5ceaa5e

File tree

1 file changed

+1
-1
lines changed
  • packages/babel-helper-define-polyfill-provider/src/visitors

1 file changed

+1
-1
lines changed

packages/babel-helper-define-polyfill-provider/src/visitors/usage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function isRemoved(path: NodePath) {
1010
if (path.listKey) {
1111
if (!path.parentPath.node?.[path.listKey]?.includes(path.node)) return true;
1212
} else {
13-
if (path.parentPath.node[path.key] !== path.node) return true;
13+
if (path.parentPath.node?.[path.key] !== path.node) return true;
1414
}
1515
return isRemoved(path.parentPath);
1616
}

0 commit comments

Comments
 (0)