fix url previewer miss

This commit is contained in:
DefectingCat
2024-01-04 11:31:29 +08:00
parent d5607c0105
commit 1abd3360aa

View File

@ -18,7 +18,7 @@ const Paragraph = (props: HTMLAttributes<HTMLParagraphElement>) => {
if (typeof child.type !== 'object') return null; if (typeof child.type !== 'object') return null;
const childType = child.type as ChildType; const childType = child.type as ChildType;
if (!childType?.type) return null; 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 }; const props = child.props as { href: string };
return props.href; return props.href;
}); });