~bigbes/game-prototype-ftl

7d266a3ed0ff36694b042467963d582a7b694405 — Eugene Blikh 6 days ago 62c4b37
fix(wasm): set go.env to empty object

Initialize go.env to an empty object before running the WASM module to avoid an undefined-env error in the browser.
1 files changed, 1 insertions(+), 0 deletions(-)

M web/index.html
M web/index.html => web/index.html +1 -0
@@ 10,6 10,7 @@
  <script src="wasm_exec.js"></script>
  <script>
    const go = new Go();
    go.env = {};
    WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject)
      .then((r) => go.run(r.instance));
  </script>