diff --git a/bids-validator/src/summary/summary.ts b/bids-validator/src/summary/summary.ts index d30305604..e90a16a22 100644 --- a/bids-validator/src/summary/summary.ts +++ b/bids-validator/src/summary/summary.ts @@ -123,7 +123,7 @@ export class Summary { } if (context.extension === '.json') { - if ('TaskName' in context.json) { + if (typeof context.json === 'object' && 'TaskName' in context.json) { this.tasks.add(context.json.TaskName as string) } }