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:
parent
962ea78e9c
commit
5056af5fac
1 changed files with 4 additions and 4 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue