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