From 4e7557cbcccc22eaf987a415d738a1a649fbd1f9 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Tue, 1 Jul 2025 01:30:10 -0400 Subject: [PATCH] fix truly heinous memory bug --- justfile | 2 +- pkg/worker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 52fd6b2..aad761d 100644 --- a/justfile +++ b/justfile @@ -17,7 +17,7 @@ clean-wasm-pack: serve: - miniserve pkg && open http://localhost:8080/index.html + open http://localhost:8080/index.html && miniserve pkg default: @just --list diff --git a/pkg/worker.js b/pkg/worker.js index 33812a6..7bdd3cb 100644 --- a/pkg/worker.js +++ b/pkg/worker.js @@ -15,9 +15,9 @@ let loaded_wasm = false async function run(e) { if (!loaded_wasm) { + loaded_wasm = true await init() console.log("Worker: Ludus has been initialized.") - loaded_wasm = true } let msgs = e.data for (const msg of msgs) {