Fix `initCompLabelEdit` not being called (#29198)

Fix broken `if` from https://github.com/go-gitea/gitea/pull/29195

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
pull/29005/head
Yarden Shoham 9 months ago committed by GitHub
parent 0768842ef5
commit 2d8756a960
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      web_src/js/features/common-organization.js

@ -6,9 +6,7 @@ export function initCommonOrganization() {
return; return;
} }
const orgNameInput = document.querySelector('.organization.settings.options #org_name'); document.querySelector('.organization.settings.options #org_name')?.addEventListener('input', function () {
if (!orgNameInput) return;
orgNameInput.addEventListener('input', function () {
const nameChanged = this.value.toLowerCase() !== this.getAttribute('data-org-name').toLowerCase(); const nameChanged = this.value.toLowerCase() !== this.getAttribute('data-org-name').toLowerCase();
toggleElem('#org-name-change-prompt', nameChanged); toggleElem('#org-name-change-prompt', nameChanged);
}); });

Loading…
Cancel
Save