mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
Check if console is null or undefined.
This commit is contained in:
parent
e1176fe2bb
commit
646c0cfd46
@ -100,10 +100,14 @@ if [ "$DIST" = yes ]; then
|
||||
var Module = _Module;
|
||||
Module.onAbort = reject;
|
||||
Module.print = function(what) {
|
||||
console.log(what);
|
||||
if (console != null) {
|
||||
console.log(what);
|
||||
}
|
||||
}
|
||||
Module.printErr = function(what) {
|
||||
console.warn(what);
|
||||
if (console != null) {
|
||||
console.warn(what);
|
||||
}
|
||||
}
|
||||
Module.onRuntimeInitialized = function() {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user