Skip to content

Commit

Permalink
regression: voip beforeunload listener being added instead of removed (
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandernsilva authored Oct 9, 2024
1 parent 6843990 commit c24b0e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui-voip/src/providers/VoipProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const VoipProvider = ({ children }: { children: ReactNode }) => {
voipClient.networkEmitter.off('disconnected', onNetworkDisconnected);
voipClient.networkEmitter.off('connectionerror', onNetworkDisconnected);
voipClient.networkEmitter.off('localnetworkoffline', onNetworkDisconnected);
window.addEventListener('beforeunload', onBeforeUnload);
window.removeEventListener('beforeunload', onBeforeUnload);
};
}, [dispatchToastMessage, setStorageRegistered, t, voipClient, voipSounds]);

Expand Down

0 comments on commit c24b0e5

Please sign in to comment.