diff --git a/web_src/js/features/common-organization.js b/web_src/js/features/common-organization.js index a950af3ad..442714a3d 100644 --- a/web_src/js/features/common-organization.js +++ b/web_src/js/features/common-organization.js @@ -6,9 +6,7 @@ export function initCommonOrganization() { return; } - const orgNameInput = document.querySelector('.organization.settings.options #org_name'); - if (!orgNameInput) return; - orgNameInput.addEventListener('input', function () { + document.querySelector('.organization.settings.options #org_name')?.addEventListener('input', function () { const nameChanged = this.value.toLowerCase() !== this.getAttribute('data-org-name').toLowerCase(); toggleElem('#org-name-change-prompt', nameChanged); });