From f642149364c2fb96fba3558f26e42bd2716ac9a7 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 739048bd..8a7c950f 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")