Close EventSource before unloading the page (#11539)

Should eliminate a error in the Firefox console regarding the connection
being interrupted while the page was loading.
tokarchuk/v1.17
silverwind 5 years ago committed by GitHub
parent 88fe7b5a72
commit 6af13dbac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      web_src/js/features/notification.js

@ -52,6 +52,9 @@ export function initNotificationCount() {
source.close(); source.close();
window.location.href = AppSubUrl; window.location.href = AppSubUrl;
}); });
window.addEventListener('beforeunload', () => {
source.close();
});
return; return;
} }

Loading…
Cancel
Save