Skip to content

Commit

Permalink
fix: add source === undefined checks to prevent type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamscached committed Mar 29, 2024
1 parent bc76c06 commit 95eb05d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/validator/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
minLine = error.where[0];
maxLine = minLine;
} else if (error instanceof TypeError) {
if (source === undefined) return null;
const typeLine = getJsonPathLine("/type", source!);
if (typeLine === null) return null;
minLine = typeLine;
Expand Down

0 comments on commit 95eb05d

Please sign in to comment.