Fix JS error expecting an absent form

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-02-12 14:07:48 +01:00
parent 83bc8042ce
commit d395ae625a

View file

@ -1,4 +1,9 @@
document.addEventListener("DOMContentLoaded", function () {
// Don't run if the expected form isn't present.
if (document.getElementById('options-form') === null) {
return;
}
// Hide submit button initially
const optionsFormSubmit = document.querySelectorAll(".options-form-submit");
optionsFormSubmit.forEach(element => {