File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
bids-validator/src/validators Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { type BIDSContext, BIDSContextDataset } from '../schema/context.ts'
1818import type { parseOptions } from '../setup/options.ts'
1919import { hedValidate } from './hed.ts'
2020import { citationValidate } from './citation.ts'
21+ import { logger } from '../utils/logger.ts'
2122
2223/**
2324 * Ordering of checks to apply
@@ -121,8 +122,12 @@ export async function validate(
121122 // Map blacklisted datatypes back to the modality that generated them
122123 for ( const modality of options . blacklistModalities ) {
123124 const datatypes = modalitiesRule [ modality . toLowerCase ( ) ] ?. datatypes as string [ ]
124- for ( const datatype of datatypes ) {
125- blacklistedDatatypes . set ( datatype , modality )
125+ if ( datatypes ) {
126+ for ( const datatype of datatypes ) {
127+ blacklistedDatatypes . set ( datatype , modality )
128+ }
129+ } else {
130+ logger . warn ( `Attempted to blacklist unknown modality: ${ modality } ` )
126131 }
127132 }
128133 }
You can’t perform that action at this time.
0 commit comments