From 68f96115287294c20f0b359321f470e869514364 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 4 Aug 2011 09:17:32 +0000 Subject: [PATCH] avoid JavaScript Error on openComposeWindow, when there is no mailGrid --- felamimail/js/jscode/viewMainScreen.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/felamimail/js/jscode/viewMainScreen.js b/felamimail/js/jscode/viewMainScreen.js index 3b1a3dcd99..a887bdef7e 100644 --- a/felamimail/js/jscode/viewMainScreen.js +++ b/felamimail/js/jscode/viewMainScreen.js @@ -820,7 +820,9 @@ function mail_openComposeWindow(_url,forwardByCompose) { var _messageList; var sMessageList=''; var cbAllMessages = document.getElementById('selectAllMessagesCheckBox').checked; - var cbAllVisibleMessages = mailGrid.dataRoot.actionObject.getAllSelected(); + // check if mailgrid exists, before accessing it + var cbAllVisibleMessages; + if (mailGrid) cbAllVisibleMessages = mailGrid.dataRoot.actionObject.getAllSelected(); if (typeof forwardByCompose == 'undefined') forwardByCompose = true; if (forwardByCompose == false) {