Revert "fix: use async in render-after-error"

This reverts commit d59f878020.
This commit is contained in:
Sidharth Vinod 2022-10-10 22:04:05 +08:00
parent ba436cc37a
commit 60e4585e20
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
1 changed files with 7 additions and 9 deletions

View File

@ -14,16 +14,14 @@
mermaid.init({ startOnLoad: false });
mermaid.mermaidAPI.initialize({ securityLevel: 'strict' });
(async () => {
try {
console.log('rendering');
await mermaid.mermaidAPI.renderAsync('graphDiv', `>`);
} catch (e) {}
try {
console.log('rendering');
mermaid.mermaidAPI.render('graphDiv', `>`);
} catch (e) {}
await mermaid.mermaidAPI.renderAsync('graphDiv', `graph LR\n a --> b`, (html) => {
document.getElementById('graph').innerHTML = html;
});
})();
mermaid.mermaidAPI.render('graphDiv', `graph LR\n a --> b`, (html) => {
document.getElementById('graph').innerHTML = html;
});
</script>
</body>
</html>