diff --git a/packages/editor/src/toolbar/tools/link.tsx b/packages/editor/src/toolbar/tools/link.tsx index f14f9fb11..8afa5a616 100644 --- a/packages/editor/src/toolbar/tools/link.tsx +++ b/packages/editor/src/toolbar/tools/link.tsx @@ -196,6 +196,7 @@ export function OpenLink(props: ToolProps) { const link = node ? findMark(node, "link") : null; if (!link) return null; const href = link?.attrs.href; + if (!href) return null; return ( @@ -245,6 +246,7 @@ export function CopyLink(props: ToolProps) { const link = node ? findMark(node, "link") : null; if (!link) return null; const href = link?.attrs.href; + if (!href) return null; return (