diff --git a/app/components/markdown.tsx b/app/components/markdown.tsx index 3d8645659..e15c498e6 100644 --- a/app/components/markdown.tsx +++ b/app/components/markdown.tsx @@ -96,7 +96,8 @@ export function Markdown( components={{ pre: PreCode, a: (aProps) => { - const isInternal = /^\/#/i.test(aProps.href); + const href = aProps.href || ""; + const isInternal = /^\/#/i.test(href); const target = isInternal ? "_self" : aProps.target ?? "_blank"; return ; },