mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
libsodium.js totalMemory minor fix (#610)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user