make wasm not found better
Some checks failed
CI / Build Scramjet (push) Failing after 5s
CI / Run Scramjet Tests (push) Has been skipped
CI / Upload release (push) Has been skipped
CI / Publish Scramjet to NPM (push) Has been skipped
CI / Upload to Github Pages (push) Has been skipped

This commit is contained in:
Toshit Chawda 2025-05-15 19:42:59 -07:00
parent c1f7ebf752
commit c29a0b6627
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D

View file

@ -30,6 +30,8 @@ function rewriteJsWasm(
meta: URLMeta, meta: URLMeta,
module: boolean module: boolean
): { js: string | Uint8Array; map: Uint8Array | null; tag: string } { ): { js: string | Uint8Array; map: Uint8Array | null; tag: string } {
if (!(self.REAL_WASM && self.REAL_WASM instanceof Uint8Array))
throw new Error("rewriter wasm not found (was it fetched correctly?)");
initSync({ initSync({
module: new WebAssembly.Module(self.REAL_WASM), module: new WebAssembly.Module(self.REAL_WASM),
}); });