diff --git a/mailnews/base/resources/content/mailWindowOverlay.js b/mailnews/base/resources/content/mailWindowOverlay.js index 355447c0845e..89e36a19b626 100644 --- a/mailnews/base/resources/content/mailWindowOverlay.js +++ b/mailnews/base/resources/content/mailWindowOverlay.js @@ -376,9 +376,9 @@ function InitMessageMenu() // disable the move and copy menus if there are no messages selected. // disable the move menu if we can't delete msgs from the folder var moveMenu = document.getElementById("moveMenu"); + var msgFolder = GetLoadedMsgFolder(); if(moveMenu) { - var msgFolder = GetLoadedMsgFolder(); var enableMenuItem = aMessage && msgFolder && msgFolder.canDeleteMessages; moveMenu.setAttribute("disabled", !enableMenuItem); } @@ -399,10 +399,7 @@ function InitMessageMenu() // Disable mark menu when we're not in a folder var markMenu = document.getElementById("markMenu"); if(markMenu) - { - var msgFolder = GetLoadedMsgFolder(); markMenu.setAttribute("disabled", !msgFolder); - } document.commandDispatcher.updateCommands('create-menu-message'); }