diff --git a/mail/components/extensions/parent/ext-mailTabs.js b/mail/components/extensions/parent/ext-mailTabs.js index 498d252424..c3c4d3535a 100644 --- a/mail/components/extensions/parent/ext-mailTabs.js +++ b/mail/components/extensions/parent/ext-mailTabs.js @@ -310,7 +310,9 @@ this.mailTabs = class extends ExtensionAPI { async getSelectedMessages(tabId) { let tab = getTabOrActive(tabId); let { folderDisplay } = tab.nativeTab; - let messageList = folderDisplay.view.dbView.getSelectedMsgHdrs(); + let messageList = folderDisplay.view.dbView + ? folderDisplay.view.dbView.getSelectedMsgHdrs() + : []; return messageListTracker.startList(messageList, extension); },