From 68b72bfa6f52c3f606804d23c9172c8d62e1b58a Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Sun, 21 Dec 2014 20:55:15 -0800 Subject: [PATCH] fix(background): remove data for closed tabs --- background.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/background.js b/background.js index d83e1c0..8f65e64 100644 --- a/background.js +++ b/background.js @@ -91,3 +91,9 @@ chrome.runtime.onConnect.addListener(function(devToolsPort) { } }); + +chrome.tabs.onRemoved.addListener(function (tabId) { + if (data[tabId]) { + delete data[tabId]; + } +});