From b73f44671380d8740377ff186e78727a11ad5d54 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Wed, 29 Jan 2025 21:50:28 -0800 Subject: [PATCH] Fallback to show raw outputted diagram if fails rendering --- .../web/app/components/mermaid/mermaid.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/interface/web/app/components/mermaid/mermaid.tsx b/src/interface/web/app/components/mermaid/mermaid.tsx index d73a4447..bdbbe6a3 100644 --- a/src/interface/web/app/components/mermaid/mermaid.tsx +++ b/src/interface/web/app/components/mermaid/mermaid.tsx @@ -141,10 +141,17 @@ const Mermaid: React.FC = ({ chart }) => { return (
{mermaidError ? ( -
- - Error rendering diagram: {mermaidError} -
+ <> +
+ + {mermaidError} +
+ + { + chart + } + + ) : (