From: Michael M Slusarz Date: Thu, 8 Oct 2009 22:00:43 +0000 (-0600) Subject: Fix firebug console detection X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8cc0260a97f7521333a1a517f05f323bd10e1c3e;p=horde.git Fix firebug console detection --- diff --git a/imp/js/DimpCore.js b/imp/js/DimpCore.js index 5bd4e2870..11d9cdc63 100644 --- a/imp/js/DimpCore.js +++ b/imp/js/DimpCore.js @@ -26,9 +26,9 @@ var DimpCore = { debug: function(label, e) { if (!this.is_logout && DIMP.conf.debug) { - if (console && console.error) { + if (window.console && window.console.error) { // Firebug error reporting. - console.error(label, e); + window.console.error(label, e); } else { alert(label + ': ' + ((e instanceof Error && e.name && e.message) ? e.name + '-' + e.message : Object.inspect(e)) + (e.lineNumber ? ' (Line #' + e.lineNumber + ')' : '')); }