From e6298723247ac5c3e9d5e94ac37547d1cfaa5efd Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 12 Oct 2023 19:17:42 -0400 Subject: [PATCH] FIX: exists(null, ...) == 0 --- bids-validator/src/schema/expressionLanguage.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bids-validator/src/schema/expressionLanguage.ts b/bids-validator/src/schema/expressionLanguage.ts index 512319965..93ba08445 100644 --- a/bids-validator/src/schema/expressionLanguage.ts +++ b/bids-validator/src/schema/expressionLanguage.ts @@ -1,4 +1,8 @@ function exists(list: string[], rule: string = 'dataset'): number { + if (list == null) { + return 0 + } + const prefix: string[] = [] // Stimuli and subject-relative paths get prefixes