Browse Source

Properly check if console exists.

master
bas-d 5 years ago
parent
commit
1fd2422623
  1. 4
      dist-build/emscripten.sh

4
dist-build/emscripten.sh

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

Loading…
Cancel
Save