Bug #9061: Growler log doesn't exist in popup windows
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 27 May 2010 16:44:43 +0000 (10:44 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 27 May 2010 16:44:53 +0000 (10:44 -0600)
imp/js/dimpcore.js

index 3f5c75c..55b0e4f 100644 (file)
@@ -565,11 +565,14 @@ var DimpCore = {
             noalerts: DIMP.text.noalerts,
             info: DIMP.text.growlerinfo
         });
-        this.Growler.growlerlog.observe('Growler:toggled', function(e) {
-            $('alertsloglink')
-                .down('A')
-                .update(e.memo.visible ? DIMP.text.hidealog : DIMP.text.showalog);
-        }.bindAsEventListener(this));
+
+        if (this.growler_log) {
+            this.Growler.growlerlog.observe('Growler:toggled', function(e) {
+                $('alertsloglink')
+                    .down('A')
+                    .update(e.memo.visible ? DIMP.text.hidealog : DIMP.text.showalog);
+            }.bindAsEventListener(this));
+        }
 
         /* Add click handler. */
         document.observe('click', DimpCore.clickHandler.bindAsEventListener(DimpCore));