123
This commit is contained in:
@ -57,7 +57,7 @@ export function LessonContentViewer({ content, className }: LessonContentViewerP
|
||||
if (!containerRef.current || !content) return;
|
||||
const mermaidNodes = containerRef.current.querySelectorAll('pre[data-language="mermaid"]');
|
||||
if (mermaidNodes.length === 0) return;
|
||||
mermaid.run({ nodes: Array.from(mermaidNodes), suppressErrors: true }).catch(() => {});
|
||||
mermaid.run({ nodes: Array.from(mermaidNodes) as HTMLElement[], suppressErrors: true }).catch(() => {});
|
||||
}, [content]);
|
||||
|
||||
if (!editor) return null;
|
||||
|
||||
Reference in New Issue
Block a user