diff --git a/bids-validator/src/setup/loadSchema.ts b/bids-validator/src/setup/loadSchema.ts index c8402d138..9959fff86 100644 --- a/bids-validator/src/setup/loadSchema.ts +++ b/bids-validator/src/setup/loadSchema.ts @@ -10,7 +10,8 @@ import * as schemaDefault from 'https://bids-specification.readthedocs.io/en/lat export async function loadSchema(version = 'latest'): Promise { const versionRegex = /^v\d/ let schemaUrl = version - const bidsSchema = typeof Deno !== 'undefined' && Deno.env.get('BIDS_SCHEMA') + const bidsSchema = + typeof Deno !== 'undefined' ? Deno.env.get('BIDS_SCHEMA') : undefined if (bidsSchema !== undefined) { schemaUrl = bidsSchema } else if (version === 'latest' || versionRegex.test(version)) {