From 16d8ec5ec9425a295a2df0b3e6089fcd81f93a77 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 b98916e17..b3a49e502 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); + } };