mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 21:38:43 +00:00
fix: mermaid error on rating
This commit is contained in:
parent
1803c7adeb
commit
2cd1207e73
@ -217,8 +217,10 @@ __builtins__.input = input`);
|
||||
|
||||
const drawMermaidDiagram = async () => {
|
||||
try {
|
||||
const { svg } = await mermaid.render(`mermaid-${uuidv4()}`, code);
|
||||
mermaidHtml = svg;
|
||||
if (await mermaid.parse(code)) {
|
||||
const { svg } = await mermaid.render(`mermaid-${uuidv4()}`, code);
|
||||
mermaidHtml = svg;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('Error:', error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user