Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

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

NFishddf9eb1f9a69
diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx
index 1a4358c8bcf..2b58b932a47 100644
--- a/web/app/components/base/markdown.tsx
+++ b/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
+ }
</>
)
}