From f2bab8726b086a3c9c9f6d7e188964d3fefcb691 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 29 Jul 2024 22:20:17 -0400 Subject: [PATCH] fix(summary): Verify context.json is an object before looking up keys --- bids-validator/src/summary/summary.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } }