mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-27 07:32:45 +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:
@ -77,7 +77,7 @@ function filterRepoFiles(filter) {
|
||||
|
||||
const filterResult = filterRepoFilesWeighted(files, filter);
|
||||
|
||||
toggleElem(repoFindFileNoResult, filterResult.length === 0);
|
||||
toggleElem(repoFindFileNoResult, !filterResult.length);
|
||||
for (const r of filterResult) {
|
||||
const row = document.createElement('tr');
|
||||
const cell = document.createElement('td');
|
||||
|
Reference in New Issue
Block a user