Skip to content

Commit

Permalink
editor: fix editor crash due to `TypeError: t.startsWith is not a fun…
Browse files Browse the repository at this point in the history
…ction`
  • Loading branch information
thecodrr committed May 11, 2024
1 parent c02f1cd commit 533f95f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/toolbar/tools/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,5 @@ function LinkTool(props: LinkToolProps) {
}

function isInternalLink(href?: string | null) {
return !!href?.startsWith("nn://");
return typeof href === "string" ? href.startsWith("nn://") : false;
}

0 comments on commit 533f95f

Please sign in to comment.