Преглед на файлове

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

NFish преди 5 месеца
родител
ревизия
ddf9eb1f9a
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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
+        }
       </>
     )
   }