@@ -119,19 +119,21 @@ const NodeDetails = ({
119119 {
120120 localStorageManager . getFileList ( )
121121 // eslint-disable-next-line max-len, prefer-arrow-callback
122- ? JSON . parse ( localStorageManager . getFileList ( ) ) . map ( function fn ( item ) {
123- const acceptedTypes = [ '.v' , '.c' , '.cpp' , '.py' , '.m' , '.sh' ] ;
124- const list = [ ] ;
125- let index ;
126- // eslint-disable-next-line max-len
127- if ( ( acceptedTypes . some ( ( substring ) => item . key . toString ( ) . includes ( substring ) ) ) ) {
128- list . push ( item . key . toString ( ) ) ;
129- indexOfFile . push ( indexOfFile [ indexOfFile . length - 1 ] + 1 ) ;
130- index = indexOfFile [ indexOfFile . length - 1 ] + 1 ;
131- }
132- // eslint-disable-next-line jsx-a11y/control-has-associated-label
133- return < option value = { list } key = { index } /> ;
134- } )
122+ ? JSON . parse ( localStorageManager . getFileList ( ) )
123+ . map ( ( item ) => {
124+ const list = [ ] ;
125+ const acceptedTypes = [ '.v' , '.c' , '.cpp' , '.py' , '.m' , '.sh' ] ;
126+ let index ;
127+ // eslint-disable-next-line max-len
128+ if ( ( acceptedTypes . some ( ( substring ) => item . key . toString ( ) . includes ( substring ) ) ) ) {
129+ list . push ( item . key . toString ( ) ) ;
130+ indexOfFile . push ( indexOfFile [ indexOfFile . length - 1 ] + 1 ) ;
131+ index = indexOfFile [ indexOfFile . length - 1 ] + 1 ;
132+ // eslint-disable-next-line jsx-a11y/control-has-associated-label
133+ return < option value = { list } key = { index } /> ;
134+ }
135+ return null ;
136+ } )
135137 : ''
136138 }
137139 </ datalist >
0 commit comments