aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2024-02-16 18:03:52 +0200
committerGitHub <noreply@github.com>2024-02-16 17:03:52 +0100
commit2d8756a9607ee6029ad7a44985e9751988d5fdaa (patch)
tree74d1ad666de6eda4640a48e8ec174545270a106c
parent0768842ef56758b3290406656c5ebbd605358f6e (diff)
downloadgitea-2d8756a9607ee6029ad7a44985e9751988d5fdaa.tar.gz
gitea-2d8756a9607ee6029ad7a44985e9751988d5fdaa.zip
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>
-rw-r--r--web_src/js/features/common-organization.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/web_src/js/features/common-organization.js b/web_src/js/features/common-organization.js
index a950af3adf..442714a3d6 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);
});