1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-09-01 14:56:30 +00:00

Close EventSource before unloading the page () ()

Should eliminate a error in the Firefox console regarding the connection
being interrupted while the page was loading.
This commit is contained in:
silverwind 2020-05-22 20:30:30 +02:00 committed by GitHub
parent 2a6e6bf0f1
commit d131d53cbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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