mirror of
https://github.com/go-gitea/gitea
synced 2024-11-25 04:52:47 +01:00
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.
This commit is contained in:
parent
88fe7b5a72
commit
6af13dbac2
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,9 @@ export function initNotificationCount() {
|
|||
source.close();
|
||||
window.location.href = AppSubUrl;
|
||||
});
|
||||
window.addEventListener('beforeunload', () => {
|
||||
source.close();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue