fix: #13939, dont append / if url is empty

dont call updateHistory twice on page load
This commit is contained in:
Barış Soner Uşaklı
2026-01-30 10:46:13 -05:00
parent 8d6b6f6a59
commit 2dc49c8228
2 changed files with 9 additions and 5 deletions

View File

@@ -74,6 +74,7 @@ define('messages', ['bootbox', 'translator', 'storage', 'alerts', 'hooks'], func
function showQueryStringMessages() {
const params = utils.params({ full: true });
const originalQs = params.toString();
showWelcomeMessage = params.has('loggedin');
registerMessage = params.get('register');
@@ -102,7 +103,9 @@ define('messages', ['bootbox', 'translator', 'storage', 'alerts', 'hooks'], func
}
const qs = params.toString();
ajaxify.updateHistory(ajaxify.currentPage + (qs ? `?${qs}` : '') + document.location.hash, true);
if (qs !== originalQs) {
ajaxify.updateHistory(ajaxify.currentPage + (qs ? `?${qs}` : '') + document.location.hash, true);
}
}
messages.showInvalidSession = function () {