Skip to content

Commit

Permalink
Avoid crash in isRemoved (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Apr 22, 2024
1 parent 77d7ea7 commit 94bc376
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -8,7 +8,7 @@ function isRemoved(path: NodePath) {
if (path.removed) return true;
if (!path.parentPath) return false;
if (path.listKey) {
if (!path.parentPath.node[path.listKey].includes(path.node)) return true;
if (!path.parentPath.node?.[path.listKey]?.includes(path.node)) return true;
} else {
if (path.parentPath.node[path.key] !== path.node) return true;
}
Expand Down

0 comments on commit 94bc376

Please sign in to comment.