0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2025-03-15 14:42:04 +01:00

fix webui lint issues

This commit is contained in:
6543 2024-10-21 21:33:27 +02:00
parent 962ea78e9c
commit 5056af5fac

View file

@ -2,15 +2,15 @@ import {createSortable} from '../modules/sortable.ts';
import {POST} from '../modules/fetch.ts';
export function initRepoBranchesSettings() {
const protectedBranchesList = document.getElementById('protected-branches-list');
const protectedBranchesList = document.querySelector('#protected-branches-list');
if (!protectedBranchesList) return;
createSortable(protectedBranchesList, {
handle: '.drag-handle',
animation: 150,
onEnd: async (evt) => {
const newOrder = Array.from(protectedBranchesList.children).map((item) => {
const id = item.dataset.id;
onEnd: async (e) => { // eslint-disable-line @typescript-eslint/no-misused-promises
const newOrder = Array.from(protectedBranchesList.children, (item) => {
const id = item.getAttribute('data-id');
return id ? parseInt(id, 10) : NaN;
}).filter(id => !isNaN(id));