From 88c2062c89ddc1d46542d63b94d2e5f96d12897c Mon Sep 17 00:00:00 2001 From: Stefan Thomas Date: Mon, 21 Jan 2013 20:18:08 +0100 Subject: [PATCH] Give more useful console output in IE9. --- src/js/utils.web.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/utils.web.js b/src/js/utils.web.js index b98916e1..b3a49e50 100644 --- a/src/js/utils.web.js +++ b/src/js/utils.web.js @@ -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); + } };