From 0486b610c0065b613520e6ce60825d87026feffd Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Fri, 12 Jul 2013 16:30:52 -0700 Subject: [PATCH] Added polyfils for IE console object. --- UI/Instrumentation/ErrorHandler.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/UI/Instrumentation/ErrorHandler.js b/UI/Instrumentation/ErrorHandler.js index ba1d8a7d4..5b2b5d07f 100644 --- a/UI/Instrumentation/ErrorHandler.js +++ b/UI/Instrumentation/ErrorHandler.js @@ -1,15 +1,13 @@ 'use strict'; (function () { - if (!window.console) { - window.console = {}; - } - - if (!window.console.debug) { - window.console.debug = function () { - - }; - } + window.console = window.console || {}; + window.console.log = window.console.log || function(){}; + window.console.group = window.console.group || function(){}; + window.console.groupEnd = window.console.groupEnd || function(){}; + window.console.debug = window.console.debug || function(){}; + window.console.warn = window.console.warn || function(){}; + window.console.assert = window.console.assert || function(){}; window.alert = function (message) { window.Messenger().post(message);