Skip to content

Commit b939a8d

Browse files
committed
fix webui lint issues
1 parent 5056af5 commit b939a8d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

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

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

810
createSortable(protectedBranchesList, {
911
handle: '.drag-handle',
1012
animation: 150,
11-
onEnd: async (e) => { // eslint-disable-line @typescript-eslint/no-misused-promises
13+
onEnd: async () => { // eslint-disable-line @typescript-eslint/no-misused-promises
1214
const newOrder = Array.from(protectedBranchesList.children, (item) => {
1315
const id = item.getAttribute('data-id');
14-
return id ? parseInt(id, 10) : NaN;
15-
}).filter(id => !isNaN(id));
16+
return id ? parseInt(id) : NaN;
17+
}).filter((id) => !Number.isNaN(id));
1618

1719
try {
1820
await POST(protectedBranchesList.getAttribute('data-priority-url'), {

0 commit comments

Comments
 (0)