Skip to content

Commit

Permalink
fix(summary): Verify context.json is an object before looking up keys
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Jul 30, 2024
1 parent 93868ab commit f2bab87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bids-validator/src/summary/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit f2bab87

Please sign in to comment.