File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,15 @@ import {createSortable} from '../modules/sortable.ts';
22import { POST } from '../modules/fetch.ts' ;
33
44export 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
You can’t perform that action at this time.
0 commit comments