mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 21:42:58 +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 () => {
|
const drawMermaidDiagram = async () => {
|
||||||
try {
|
try {
|
||||||
const { svg } = await mermaid.render(`mermaid-${uuidv4()}`, code);
|
if (await mermaid.parse(code)) {
|
||||||
mermaidHtml = svg;
|
const { svg } = await mermaid.render(`mermaid-${uuidv4()}`, code);
|
||||||
|
mermaidHtml = svg;
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Error:', error);
|
console.log('Error:', error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user