From 8cc0260a97f7521333a1a517f05f323bd10e1c3e Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 8 Oct 2009 16:00:43 -0600 Subject: [PATCH] Fix firebug console detection --- imp/js/DimpCore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 + ')' : '')); } -- 2.11.0