1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

libsodium.js totalMemory minor fix (#610)

This commit is contained in:
Ryan Lester 2017-10-05 04:45:31 -04:00 committed by Frank Denis
parent 09ecb47a53
commit 381080bf02

View File

@ -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;