Skip to content

Commit 9f85c4c

Browse files
committed
fix(frontend): prevent endless browser reload when user session is terminated
1 parent 4f5654f commit 9f85c4c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/core/navigation/navigation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ window.addEventListener('popstate', function(event) {
3030
});
3131

3232
window.addEventListener('load', function() {
33+
if (!hm_is_logged()) {
34+
return;
35+
}
36+
3337
const unMountCallback = renderPage(window.location.href);
3438
history.replaceState({ main: $('#cypht-main').prop('outerHTML'), scripts: extractCustomScripts($(document)) }, "");
3539

0 commit comments

Comments
 (0)