From 2a8c2426b53ce07a67ce87c7d42038b406353752 Mon Sep 17 00:00:00 2001 From: Ryan Lester Date: Sat, 29 Sep 2018 18:22:42 -0400 Subject: [PATCH] useBackupModule getRandomValue fix --- dist-build/emscripten.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index a1ea0c01..778f3e74 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -110,7 +110,9 @@ if [ "$DIST" = yes ]; then Module.useBackupModule = function () { var Module = _Module; Object.keys(Module).forEach(function(k) { - delete Module[k]; + if (k !== 'getRandomValue') { + delete Module[k]; + } }); $(cat "${PREFIX}/lib/libsodium.asm.tmp.js" | sed 's|use asm||g') };