diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 34af9313..a60809c6 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -79,7 +79,7 @@ if [ "$DIST" = yes ]; then } Module.ready = new Promise(function (resolve, reject) { Module.onAbort = reject; - Module.onRuntimeInitialized = function () { resolve(); }; + Module.onRuntimeInitialized = resolve; $(cat "${PREFIX}/lib/libsodium.wasm.tmp.js") }).catch(function () { Module.onAbort = undefined;