fix: add error handling on the wasm loading
This commit is contained in:
parent
44da77246d
commit
2bc98414b1
1 changed files with 6 additions and 2 deletions
|
|
@ -4,5 +4,9 @@ import init, { start } from "cgol";
|
||||||
|
|
||||||
document.getElementById("ansi-art")!.innerHTML = Jet;
|
document.getElementById("ansi-art")!.innerHTML = Jet;
|
||||||
|
|
||||||
await init();
|
try {
|
||||||
start();
|
await init();
|
||||||
|
start();
|
||||||
|
} catch (e) {
|
||||||
|
console.error("WASM init failed:", e);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue