File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import {createSortable} from '../modules/sortable.ts';
22import  { POST }  from  '../modules/fetch.ts' ; 
33
44export  function  initRepoBranchesSettings ( )  { 
5-   const  protectedBranchesList  =  document . querySelector ( 
6-     '#protected-branches-list' , 
7-   ) ; 
5+   const  protectedBranchesList  =  document . querySelector ( '#protected-branches-list' ) ; 
86  if  ( ! protectedBranchesList )  return ; 
97
108  createSortable ( protectedBranchesList ,  { 
@@ -13,7 +11,7 @@ export function initRepoBranchesSettings() {
1311    onEnd : async  ( )  =>  {  // eslint-disable-line @typescript-eslint/no-misused-promises 
1412      const  newOrder  =  Array . from ( protectedBranchesList . children ,  ( item )  =>  { 
1513        const  id  =  item . getAttribute ( 'data-id' ) ; 
16-         return  id  ?  parseInt ( id )  :  NaN ; 
14+         return  parseInt ( id ) ; 
1715      } ) . filter ( ( id )  =>  ! Number . isNaN ( id ) ) ; 
1816
1917      try  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments