Explorar o código

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

NFish hai 1 mes
pai
achega
ddf9eb1f9a
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      web/app/components/base/markdown.tsx

+ 3 - 1
web/app/components/base/markdown.tsx

@@ -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
+        }
       </>
     )
   }