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 01e64bf259
commit 0a5590bfa7

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 => {