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