From 1393681662f84211ce9060786bb6f23c88e7dbe0 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 5 Oct 2017 02:28:14 +0200 Subject: [PATCH] Move declaration closer to usage --- dist-build/emscripten.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 41365cc5..b7ab90df 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -74,10 +74,10 @@ if [ "$DIST" = yes ]; then emccLibsodium "${PREFIX}/lib/libsodium.wasm.tmp.js" -O3 -s WASM=1 cat > "${PREFIX}/lib/libsodium.js" <<- EOM - var root = this.global || this.self || this.window || this; if (typeof Module === 'undefined') { var Module = {}; } + var root = this.global || this.self || this.window || this; if (root.sodium && !isNaN(root.sodium.totalMemory)) { Module.TOTAL_MEMORY = root.sodium.totalMemory; }