Properly check if console exists.

This commit is contained in:
bas-d
2019-05-12 13:04:11 +02:00
parent 646c0cfd46
commit 1fd2422623
+2 -2
View File
@@ -100,12 +100,12 @@ if [ "$DIST" = yes ]; then
var Module = _Module;
Module.onAbort = reject;
Module.print = function(what) {
if (console != null) {
if (typeof(console) !== 'undefined') {
console.log(what);
}
}
Module.printErr = function(what) {
if (console != null) {
if (typeof(console) !== 'undefined') {
console.warn(what);
}
}