From 51d76b88df505ecb52735f644c1be565121aedc3 Mon Sep 17 00:00:00 2001 From: Ryan Lester Date: Wed, 22 Aug 2018 20:06:32 -0400 Subject: [PATCH] iOS fix --- dist-build/emscripten.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 093fe17b..62a4b794 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -108,12 +108,16 @@ if [ "$DIST" = yes ]; then reject(err); } }; + Module.useBackupModule = function () { + var Module = _Module; + Module.onAbort = undefined; + Module.onRuntimeInitialized = undefined; + Module.useBackupModule = undefined; + $(cat "${PREFIX}/lib/libsodium.asm.tmp.js" | sed 's|use asm||g') + }; $(cat "${PREFIX}/lib/libsodium.wasm.tmp.js") }).catch(function () { - var Module = _Module; - Module.onAbort = undefined; - Module.onRuntimeInitialized = undefined; - $(cat "${PREFIX}/lib/libsodium.asm.tmp.js" | sed 's|use asm||g') + _Module.useBackupModule(); }); EOM