Skip to content

Commit

Permalink
do not use undefined loc
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- committed Jun 25, 2024
1 parent c3e3358 commit 5c3caed
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export function addFunctionComponentSourceLocationBabel() {
return;
}
const filename = state.file.opts.filename;
addDebugInfo(path, name, filename, node.body.loc);
if (node.body.loc) {
addDebugInfo(path, name, filename, node.body.loc);
}
}
}
};
Expand Down

0 comments on commit 5c3caed

Please sign in to comment.