Skip to content

Commit

Permalink
Merge pull request #2029 from effigies/fix/empty_json
Browse files Browse the repository at this point in the history
fix(summary): Verify context.json is an object before looking up keys
  • Loading branch information
rwblair authored Jul 30, 2024
2 parents 29aa601 + f2bab87 commit 603b46b
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 603b46b

Please sign in to comment.