Skip to content

Commit 5056af5

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

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

44
export function initRepoBranchesSettings() {
5-
const protectedBranchesList = document.getElementById('protected-branches-list');
5+
const protectedBranchesList = document.querySelector('#protected-branches-list');
66
if (!protectedBranchesList) return;
77

88
createSortable(protectedBranchesList, {
99
handle: '.drag-handle',
1010
animation: 150,
11-
onEnd: async (evt) => {
12-
const newOrder = Array.from(protectedBranchesList.children).map((item) => {
13-
const id = item.dataset.id;
11+
onEnd: async (e) => { // eslint-disable-line @typescript-eslint/no-misused-promises
12+
const newOrder = Array.from(protectedBranchesList.children, (item) => {
13+
const id = item.getAttribute('data-id');
1414
return id ? parseInt(id, 10) : NaN;
1515
}).filter(id => !isNaN(id));
1616

0 commit comments

Comments
 (0)