File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ function App() {
5454 const dirHandle = await directoryOpen ( {
5555 recursive : true ,
5656 } )
57+ const fileTree = await fileListToTree ( dirHandle )
5758 let config = { }
58- const configFile = dirHandle . find ( file => file . name === '.bids-validator-config.json' )
59+ const configFile = fileTree . get ( '.bids-validator-config.json' ) as BIDSFile
5960 if ( configFile ) {
60- config = configFile . text ( ) . then ( text => JSON . parse ( text ) ) . catch ( ( err ) => {
61+ config = await configFile . text ( ) . then ( text => JSON . parse ( text ) ) . catch ( ( err ) => {
6162 alert ( `Failed to load ".bids-validator-config.json". \n\nUsing empty configuration object:\n\n${ err } ` )
6263 } )
6364 }
64- const fileTree = await fileListToTree ( dirHandle )
6565 setValidation ( await validate ( fileTree , config ) )
6666 }
6767
You can’t perform that action at this time.
0 commit comments