File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ function sidecarValueHasHed(sidecarValue: unknown) {
2525let hedSchemas : object | undefined | null = undefined
2626
2727async function setHedSchemas ( datasetDescriptionJson = { } ) {
28+ if ( hedSchemas !== undefined ) {
29+ return [ ] as HedIssue [ ]
30+ }
2831 const datasetDescriptionData = new hedValidator . bids . BidsJsonFile (
2932 '/dataset_description.json' ,
3033 datasetDescriptionJson ,
@@ -59,14 +62,14 @@ export async function hedValidate(
5962 let hedValidationIssues = [ ] as HedIssue [ ]
6063
6164 try {
62- if ( context . extension == '.tsv' && context . columns ) {
65+ if ( context . extension === '.tsv' && context . columns ) {
6366 if ( ! ( 'HED' in context . columns ) && ! sidecarHasHed ( context . sidecar ) ) {
6467 return
6568 }
6669 hedValidationIssues = await setHedSchemas ( context . dataset . dataset_description )
6770
6871 file = await buildHedTsvFile ( context )
69- } else if ( context . extension == '.json' && sidecarHasHed ( context . json ) ) {
72+ } else if ( context . extension === '.json' && sidecarHasHed ( context . json ) ) {
7073 hedValidationIssues = hedValidationIssues = await setHedSchemas (
7174 context . dataset . dataset_description ,
7275 )
You can’t perform that action at this time.
0 commit comments