Don't fail on environments that miss console object in global scope

This commit is contained in:
Alexey Andreev 2020-04-30 16:06:54 +03:00
parent 1232f20ae4
commit 7313b2bb62

View File

@ -483,10 +483,10 @@ function $rt_createOutputFunction(printFunction) {
var $rt_putStdout = typeof $rt_putStdoutCustom === "function"
? $rt_putStdoutCustom
: console ? $rt_createOutputFunction(function(msg) { console.info(msg); }) : function() {};
: typeof console === "object" ? $rt_createOutputFunction(function(msg) { console.info(msg); }) : function() {};
var $rt_putStderr = typeof $rt_putStderrCustom === "function"
? $rt_putStderrCustom
: console ? $rt_createOutputFunction(function(msg) { console.error(msg); }) : function() {};
: typeof console === "object" ? $rt_createOutputFunction(function(msg) { console.error(msg); }) : function() {};
var $rt_packageData = null;
function $rt_packages(data) {