Skip to content

Commit 6af13db

Browse files
authored
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.
1 parent 88fe7b5 commit 6af13db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web_src/js/features/notification.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export function initNotificationCount() {
5252
source.close();
5353
window.location.href = AppSubUrl;
5454
});
55+
window.addEventListener('beforeunload', () => {
56+
source.close();
57+
});
5558
return;
5659
}
5760

0 commit comments

Comments
 (0)