refac: more robust mermaid chart rendering

This commit is contained in:
Timothy J. Baek
2024-08-14 21:16:07 +02:00
parent 609a42c29c
commit 9435d2044a
3 changed files with 33 additions and 16 deletions
+3
View File
@@ -3,6 +3,8 @@
import { onMount, tick, getContext } from 'svelte';
import { openDB, deleteDB } from 'idb';
import fileSaver from 'file-saver';
import mermaid from 'mermaid';
const { saveAs } = fileSaver;
import { goto } from '$app/navigation';
@@ -178,6 +180,7 @@
await tick();
}
await mermaid.initialize({ startOnLoad: false });
loaded = true;
});
</script>