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

View File

@@ -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>