mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Give more useful console output in IE9.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
exports = module.exports = require('./utils.js');
|
||||
var exports = module.exports = require('./utils.js');
|
||||
|
||||
// We override this function for browsers, because they print objects nicer
|
||||
// natively than JSON.stringify can.
|
||||
exports.logObject = function (msg, obj) {
|
||||
console.log(msg, "", obj);
|
||||
if (/MSIE/.test(navigator.userAgent)) {
|
||||
console.log(msg, JSON.stringify(obj));
|
||||
} else {
|
||||
console.log(msg, "", obj);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user