mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-29 22:13:57 +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:
@ -6,9 +6,7 @@ import {POST} from '../../modules/fetch.js';
|
||||
const {appSubUrl} = window.config;
|
||||
|
||||
export function initAdminCommon() {
|
||||
if ($('.page-content.admin').length === 0) {
|
||||
return;
|
||||
}
|
||||
if (!$('.page-content.admin').length) return;
|
||||
|
||||
// check whether appUrl(ROOT_URL) is correct, if not, show an error message
|
||||
checkAppUrl();
|
||||
|
Reference in New Issue
Block a user