Close EventSource before unloading the page (#11539) (#11557)

Should eliminate a error in the Firefox console regarding the connection
being interrupted while the page was loading.
This commit is contained in:
silverwind authored and GitHub committed 2020-05-22 19:30:30 +01:00
1 parent 2a6e6bf0f1
commit d131d53cbb
1 file changed
+3
+3
View File
@@ -52,6 +52,9 @@ export function initNotificationCount() {
source.close();
window.location.href = AppSubUrl;
});
window.addEventListener('beforeunload', () => {
source.close();
});
return;
}