소스 검색

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

NFish 1 개월 전
부모
커밋
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
+        }
       </>
     )
   }