aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-05-05 08:47:29 +0100
committerStephen Blott2015-05-05 08:47:29 +0100
commitc063619f87d140fe0abf82da73f10d1d019fd24c (patch)
tree441a0175e29fa8fa6b4b86d0e0270f1501412fa4
parent1dc789958fb861a35571c064aa13fdc5495937bb (diff)
downloadvimium-c063619f87d140fe0abf82da73f10d1d019fd24c.tar.bz2
Fix unregisterFrame logic.
-rw-r--r--background_scripts/main.coffee3
1 files changed, 2 insertions, 1 deletions
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