Fix type preventing event listener from being unloaded
This commit is contained in:
1 parent
d80085a67c
commit
195f18659d
1 file changed
+1
-1
@@ -85,7 +85,7 @@ const SharePage = (props)=>{
|
||||
|
||||
return async ()=>{
|
||||
document.removeEventListener('keydown', handleControlKeys);
|
||||
window.addEventListener('beforeunload', unsub);
|
||||
window.removeEventListener('beforeunload', unsub);
|
||||
eventSource.close();
|
||||
};
|
||||
}, []);
|
||||
|
||||
Reference in new issue
Block a user