From c3aaa3c5c6c75ac75f9659bef3aac56648bd37a8 Mon Sep 17 00:00:00 2001 From: Ryan Lester Date: Thu, 30 Aug 2018 16:54:29 -0400 Subject: [PATCH] asm.js fallback fix --- dist-build/emscripten.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 1aabaa13..a1ea0c01 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -109,9 +109,9 @@ if [ "$DIST" = yes ]; then }; Module.useBackupModule = function () { var Module = _Module; - Module.onAbort = undefined; - Module.onRuntimeInitialized = undefined; - Module.useBackupModule = undefined; + Object.keys(Module).forEach(function(k) { + delete Module[k]; + }); $(cat "${PREFIX}/lib/libsodium.asm.tmp.js" | sed 's|use asm||g') }; $(cat "${PREFIX}/lib/libsodium.wasm.tmp.js")