Skip to content

Commit b4dbe97

Browse files
committed
Delete instances only if exist
1 parent 56bd56f commit b4dbe97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/browser/extension/background/messaging.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ function messaging(request, sender, sendResponse) {
2727
if (request.type === 'PAGE_UNLOADED') {
2828
handleInstancesChanged(tabId, undefined, true);
2929
if (connections[tabId]) connections[tabId].postMessage(naMessage);
30-
delete window.store.liftedStore.instances[instance];
31-
window.store.liftedStore.deleteInstance(instance);
30+
if (window.store.liftedStore.instances[tabId]) {
31+
delete window.store.liftedStore.instances[tabId];
32+
window.store.liftedStore.deleteInstance(tabId);
33+
}
3234
return true;
3335
}
3436
if (request.type === 'GET_OPTIONS') {

0 commit comments

Comments
 (0)