DIMP.baseWindow might be undefined.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Sep 2010 18:39:45 +0000 (12:39 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Sep 2010 18:43:22 +0000 (12:43 -0600)
imp/js/dimpcore.js
imp/js/fullmessage-dimp.js

index 3adadf9..b449dd2 100644 (file)
@@ -594,6 +594,7 @@ var DimpCore = {
         /* Determine base window. Need a try/catch block here since, if the
          * page was loaded by an opener out of this current domain, this will
          * throw an exception. */
+        DIMP.baseWindow = {};
         try {
             if (parent.opener &&
                 parent.opener.location.host == window.location.host &&
index 2026401..bcbf3a1 100644 (file)
@@ -106,7 +106,7 @@ var DimpFullmessage = {
             case 'button_deleted':
             case 'button_ham':
             case 'button_spam':
-                if (DIMP.baseWindow && DIMP.baseWindow.DimpBase) {
+                if (DIMP.baseWindow.DimpBase) {
                     DIMP.baseWindow.focus();
                     if (id == 'button_deleted') {
                         DIMP.baseWindow.DimpBase.deleteMsg({ uid: this.uid, mailbox: this.mailbox });
@@ -230,7 +230,7 @@ var DimpFullmessage = {
             DimpCore.updateMsgLog(this.log);
         }
 
-        if (this.strip && DIMP.baseWindow && DIMP.baseWindow.DimpBase) {
+        if (this.strip && DIMP.baseWindow.DimpBase) {
             DIMP.baseWindow.DimpBase.poll();
         }