Skip to content

Commit

Permalink
fix(connect-webextension): dispose core in popup on page unload
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed May 7, 2024
1 parent 27ec605 commit 3233bec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/connect-popup/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,10 @@ window.closeWindow = () => {
window.close();
}, 100);
};

window.addEventListener('beforeunload', () => {
if (getState().core) {
const core = ensureCore();
core.dispose();
}
});

0 comments on commit 3233bec

Please sign in to comment.