Skip to content

Commit f0658d3

Browse files
committed
address TS review
1 parent 3614fad commit f0658d3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

web_src/js/features/repo-settings-branches.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import {createSortable} from '../modules/sortable.ts';
22
import {POST} from '../modules/fetch.ts';
33

44
export function initRepoBranchesSettings() {
5-
const protectedBranchesList = document.querySelector(
6-
'#protected-branches-list',
7-
);
5+
const protectedBranchesList = document.querySelector('#protected-branches-list');
86
if (!protectedBranchesList) return;
97

108
createSortable(protectedBranchesList, {
@@ -13,7 +11,7 @@ export function initRepoBranchesSettings() {
1311
onEnd: async () => { // eslint-disable-line @typescript-eslint/no-misused-promises
1412
const newOrder = Array.from(protectedBranchesList.children, (item) => {
1513
const id = item.getAttribute('data-id');
16-
return id ? parseInt(id) : NaN;
14+
return parseInt(id);
1715
}).filter((id) => !Number.isNaN(id));
1816

1917
try {

0 commit comments

Comments
 (0)