fix: page broke down while rendering node contained img and other elements (#14467)

This commit is contained in:
NFish 2025-02-27 16:54:54 +08:00 committed by GitHub
parent bb4fecf3d1
commit ddf9eb1f9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -211,7 +211,9 @@ const Paragraph = (paragraph: any) => {
return (
<>
<ImageGallery srcs={[children_node[0].properties.src]} />
<p>{paragraph.children.slice(1)}</p>
{
Array.isArray(paragraph.children) ? <p>{paragraph.children.slice(1)}</p> : null
}
</>
)
}