mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
Revert "fix: use async in render-after-error"
This reverts commit d59f878020
.
This commit is contained in:
@@ -14,16 +14,14 @@
|
|||||||
mermaid.init({ startOnLoad: false });
|
mermaid.init({ startOnLoad: false });
|
||||||
|
|
||||||
mermaid.mermaidAPI.initialize({ securityLevel: 'strict' });
|
mermaid.mermaidAPI.initialize({ securityLevel: 'strict' });
|
||||||
(async () => {
|
|
||||||
try {
|
try {
|
||||||
console.log('rendering');
|
console.log('rendering');
|
||||||
await mermaid.mermaidAPI.renderAsync('graphDiv', `>`);
|
mermaid.mermaidAPI.render('graphDiv', `>`);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
await mermaid.mermaidAPI.renderAsync('graphDiv', `graph LR\n a --> b`, (html) => {
|
mermaid.mermaidAPI.render('graphDiv', `graph LR\n a --> b`, (html) => {
|
||||||
document.getElementById('graph').innerHTML = html;
|
document.getElementById('graph').innerHTML = html;
|
||||||
});
|
});
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user