From 1abd3360aaac00284c97571f86bb767f0a5ac528 Mon Sep 17 00:00:00 2001 From: DefectingCat Date: Thu, 4 Jan 2024 11:31:29 +0800 Subject: [PATCH] fix url previewer miss --- components/mdx/paragraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mdx/paragraph.tsx b/components/mdx/paragraph.tsx index 2895091..3e95ad3 100644 --- a/components/mdx/paragraph.tsx +++ b/components/mdx/paragraph.tsx @@ -18,7 +18,7 @@ const Paragraph = (props: HTMLAttributes) => { if (typeof child.type !== 'object') return null; const childType = child.type as ChildType; if (!childType?.type) return null; - if (childType.type.render.displayName !== 'Anchor') return null; + if (!child.props?.href) return null; const props = child.props as { href: string }; return props.href; });