mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
fix url previewer miss
This commit is contained in:
@ -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;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user