summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/user-settings.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-25 19:37:55 +0100
committerEarl Warren <contact@earl-warren.org>2024-03-30 07:17:30 +0100
commitc55e30ff13d43fac40cc2064d3e17c035385279c (patch)
tree7debddd484411c78779a691ca04ee62376633411 /web_src/js/features/user-settings.js
parentRemove fomantic table module (#30047) (diff)
downloadforgejo-c55e30ff13d43fac40cc2064d3e17c035385279c.tar.xz
forgejo-c55e30ff13d43fac40cc2064d3e17c035385279c.zip
Refactor all `.length === 0` patterns in JS (#30045)
This pattern comes of often during review, so let's fix it once and for all. Did not test, but changes are trivial enough imho. (cherry picked from commit 8fe26fb314f1710139728d9118b455fc6a16cce2)
Diffstat (limited to '')
-rw-r--r--web_src/js/features/user-settings.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/user-settings.js b/web_src/js/features/user-settings.js
index 0dd908f34a..2d8c53e457 100644
--- a/web_src/js/features/user-settings.js
+++ b/web_src/js/features/user-settings.js
@@ -1,7 +1,7 @@
import {hideElem, showElem} from '../utils/dom.js';
export function initUserSettings() {
- if (document.querySelectorAll('.user.settings.profile').length === 0) return;
+ if (!document.querySelectorAll('.user.settings.profile').length) return;
const usernameInput = document.getElementById('username');
if (!usernameInput) return;