mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-30 06:23:13 +08:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user