From 100e1dc28d9cf8758c82d3b25420a79008b27c16 Mon Sep 17 00:00:00 2001 From: eight Date: Fri, 19 Oct 2018 08:19:36 +0800 Subject: [PATCH] Fix: TypeError in style-via-api (#521) --- background/style-via-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background/style-via-api.js b/background/style-via-api.js index 5a2c2d3c..53b98345 100644 --- a/background/style-via-api.js +++ b/background/style-via-api.js @@ -157,7 +157,7 @@ API_METHODS.styleViaAPI = !CHROME && (() => { return; } const tabFrames = cache.get(tabId); - if (frameId in tabFrames) { + if (tabFrames && frameId in tabFrames) { delete tabFrames[frameId]; if (isEmpty(tabFrames)) { onTabRemoved(tabId);