From 605ab9e46c04386807c3ec408ede1a39818d9c52 Mon Sep 17 00:00:00 2001 From: Jimmiaxie Date: Thu, 10 Apr 2025 17:38:50 +0800 Subject: [PATCH] hotfix: Workflow page element warning problem #17787 (#17789) --- web/app/components/base/markdown.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx index 0e583fd48f..987a4d0c14 100644 --- a/web/app/components/base/markdown.tsx +++ b/web/app/components/base/markdown.tsx @@ -222,19 +222,21 @@ const Paragraph = (paragraph: any) => { const children_node = node.children if (children_node && children_node[0] && 'tagName' in children_node[0] && children_node[0].tagName === 'img') { return ( - <> +
{ - Array.isArray(paragraph.children) ?

{paragraph.children.slice(1)}

: null + Array.isArray(paragraph.children) && paragraph.children.length > 1 && ( +
{paragraph.children.slice(1)}
+ ) } - +
) } return

{paragraph.children}

} const Img = ({ src }: any) => { - return () + return
} const Link = ({ node, ...props }: any) => {