Make sure we remove the event listener for beforeunload (+ some cleanup)

This commit is contained in:
Maxim Khlobystov 2018-12-20 14:03:09 -05:00
parent ab9cf5648b
commit f157c1a8fd

View File

@ -176,6 +176,7 @@ class VideoProvider extends Component {
window.removeEventListener('online', this.openWs); window.removeEventListener('online', this.openWs);
window.removeEventListener('offline', this.onWsClose); window.removeEventListener('offline', this.onWsClose);
window.removeEventListener('beforeunload', this.unshareWebcam);
this.visibility.removeEventListeners(); this.visibility.removeEventListeners();