diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 8a7c950f..8139ba07 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') };