mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-28 04:47:31 +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:
@ -71,7 +71,7 @@ export function initRepoSettingSearchTeamBox() {
|
||||
}
|
||||
|
||||
export function initRepoSettingGitHook() {
|
||||
if ($('.edit.githook').length === 0) return;
|
||||
if (!$('.edit.githook').length) return;
|
||||
const filename = document.querySelector('.hook-filename').textContent;
|
||||
const _promise = createMonaco($('#content')[0], filename, {language: 'shell'});
|
||||
}
|
||||
|
Reference in New Issue
Block a user