File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -320,9 +320,10 @@ export class BIDSContext implements Context {
320320 const participants_tsv = this . dataset . tree . get ( 'participants.tsv' ) as BIDSFile
321321 if ( participants_tsv ) {
322322 const participantsData = await loadTSV ( participants_tsv )
323- this . dataset . subjects . participant_id = participantsData [
324- 'participant_id'
325- ] as string [ ]
323+ . catch ( ( error ) => {
324+ return new Map ( )
325+ } ) as Record < string , string [ ] >
326+ this . dataset . subjects . participant_id = participantsData [ 'participant_id' ]
326327 }
327328
328329 // Load phenotype from phenotype/*.tsv
@@ -333,7 +334,10 @@ export class BIDSContext implements Context {
333334 const seen = new Set ( ) as Set < string >
334335 for ( const file of phenotypeFiles ) {
335336 const phenotypeData = await loadTSV ( file )
336- const participant_id = phenotypeData [ 'participant_id' ] as string [ ]
337+ . catch ( ( error ) => {
338+ return new Map ( )
339+ } ) as Record < string , string [ ] >
340+ const participant_id = phenotypeData [ 'participant_id' ]
337341 if ( participant_id ) {
338342 participant_id . forEach ( ( id ) => seen . add ( id ) )
339343 }
You can’t perform that action at this time.
0 commit comments