From 381080bf026313ba09d3170f7f5735c589295ee7 Mon Sep 17 00:00:00 2001 From: Ryan Lester Date: Thu, 5 Oct 2017 04:45:31 -0400 Subject: [PATCH] libsodium.js totalMemory minor fix (#610) --- dist-build/emscripten.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 20cd3ca9..14cb78c1 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -79,14 +79,14 @@ if [ "$DIST" = yes ]; then Module = {}; } var root = Module; - if (root['sodium'] !== 'object') { + if (typeof root['sodium'] !== 'object') { if (typeof global === 'object') { root = global; } else if (typeof window === 'object') { root = window; } } - if (root['sodium'] === 'object' && typeof root['sodium']['totalMemory'] === 'number') { + if (typeof root['sodium'] === 'object' && typeof root['sodium']['totalMemory'] === 'number') { Module['TOTAL_MEMORY'] = root['sodium']['totalMemory']; } var _Module = Module;