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:
parent
f73d891fc4
commit
8fe26fb314
14 changed files with 31 additions and 40 deletions
|
@ -212,8 +212,7 @@ function initRepoDiffShowMore() {
|
|||
|
||||
export function initRepoDiffView() {
|
||||
initRepoDiffConversationForm();
|
||||
const $diffFileList = $('#diff-file-list');
|
||||
if ($diffFileList.length === 0) return;
|
||||
if (!$('#diff-file-list').length) return;
|
||||
initDiffFileTree();
|
||||
initDiffCommitSelect();
|
||||
initRepoDiffShowMore();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue