Fix: TypeError in style-via-api (#521)

This commit is contained in:
eight 2018-10-19 08:19:36 +08:00 committed by Rob Garrison
parent 5cbe8a8d78
commit 100e1dc28d

View File

@ -157,7 +157,7 @@ API_METHODS.styleViaAPI = !CHROME && (() => {
return; return;
} }
const tabFrames = cache.get(tabId); const tabFrames = cache.get(tabId);
if (frameId in tabFrames) { if (tabFrames && frameId in tabFrames) {
delete tabFrames[frameId]; delete tabFrames[frameId];
if (isEmpty(tabFrames)) { if (isEmpty(tabFrames)) {
onTabRemoved(tabId); onTabRemoved(tabId);