This commit is contained in:
Bruno Rybársky 2024-02-07 18:13:24 +01:00
parent 4bd066e755
commit 612baabb63

@ -156,8 +156,6 @@ async function initAjax() {
await onPageLoad(); await onPageLoad();
} }
document.addEventListener('DOMContentLoaded', initAjax);
async function onPageLoad(){ async function onPageLoad(){
await restoreUserInfo(); await restoreUserInfo();
let currentSite = localStorage.getItem("currentSite"); let currentSite = localStorage.getItem("currentSite");
@ -412,3 +410,9 @@ async function deleteActivationCode(activationCode) {
umami.track("deleteActivationCode"); umami.track("deleteActivationCode");
} }
//Admin settings end //Admin settings end
if (document.readyState !== "loading") {
setTimeout(initAjax, 0);
} else {
document.addEventListener("DOMContentLoaded", initAjax);
}