fix(script): properly load jQuery and Bootstrap in sequence

Ensures jQuery is fully loaded before attempting to load Bootstrap, improving the reliability of modal handling and iframe interactions. This change corrects potential race conditions where Bootstrap functions might be accessed before jQuery is available. This improves the stability and predictability of modal displays and iframe content interactions.
This commit is contained in:
Kumi 2024-09-23 09:00:01 +02:00
parent 110ac67686
commit 4ac9f46986
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -42,6 +42,8 @@
});
}
waitForGlobalVariable("$")
.then(() => {
waitForGlobalVariable("bootstrap")
.then(() => {
console.log("Bootstrap loaded successfully");
@ -210,6 +212,7 @@
);
});
})
})
.catch((error) => {
console.error(error.message);
});