Skip to content

Commit 5008700

Browse files
committed
wasm: Look for both loadWebAssemblyModule and loadSideModule
See emscripten-core/emscripten#12969
1 parent bd5a9a8 commit 5008700

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/binding_web/binding.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,14 @@ class Language {
878878
}));
879879
}
880880

881+
// emscripten-core/emscripten#12969
882+
const loadModule =
883+
typeof loadSideModule === 'function'
884+
? loadSideModule
885+
: loadWebAssemblyModule;
886+
881887
return bytes
882-
.then(bytes => loadSideModule(bytes, {loadAsync: true}))
888+
.then(bytes => loadModule(bytes, {loadAsync: true}))
883889
.then(mod => {
884890
const symbolNames = Object.keys(mod)
885891
const functionName = symbolNames.find(key =>

0 commit comments

Comments
 (0)