From c063619f87d140fe0abf82da73f10d1d019fd24c Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 5 May 2015 08:47:29 +0100 Subject: Fix unregisterFrame logic. --- background_scripts/main.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 1b965314..ffed4d2d 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -602,7 +602,8 @@ unregisterFrame = (request, sender) -> # When a tab is closing, Chrome sometimes passes messages without sender.tab. Therefore, we guard against # this. tabId = sender.tab?.id - if tabId? and frameIdsForTab[tabId]? + return unless tabId? + if frameIdsForTab[tabId]? if request.tab_is_closing updateOpenTabs sender.tab, true else -- cgit v1.2.3