From: Michael M Slusarz Date: Tue, 7 Sep 2010 18:39:45 +0000 (-0600) Subject: DIMP.baseWindow might be undefined. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=af4489bb0f0678421bf283038bcd20d2a6b9a2fa;p=horde.git DIMP.baseWindow might be undefined. --- diff --git a/imp/js/dimpcore.js b/imp/js/dimpcore.js index 3adadf9f8..b449dd25b 100644 --- a/imp/js/dimpcore.js +++ b/imp/js/dimpcore.js @@ -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 && diff --git a/imp/js/fullmessage-dimp.js b/imp/js/fullmessage-dimp.js index 2026401ae..bcbf3a149 100644 --- a/imp/js/fullmessage-dimp.js +++ b/imp/js/fullmessage-dimp.js @@ -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(); }