Skip to content

Commit

Permalink
Merge pull request #1802 from nellh/loadSchema-browser-fix
Browse files Browse the repository at this point in the history
FIX: Guard Deno reference in loadSchema to allow for browser usage
  • Loading branch information
rwblair authored Sep 14, 2023
2 parents ca9ab1d + 522b95f commit 5fb24b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bids-validator/src/setup/loadSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as schemaDefault from 'https://bids-specification.readthedocs.io/en/lat
export async function loadSchema(version = 'latest'): Promise<Schema> {
const versionRegex = /^v\d/
let schemaUrl = version
const bidsSchema = Deno.env.get('BIDS_SCHEMA')
const bidsSchema = typeof Deno !== 'undefined' && Deno.env.get('BIDS_SCHEMA')
if (bidsSchema !== undefined) {
schemaUrl = bidsSchema
} else if (version === 'latest' || versionRegex.test(version)) {
Expand Down

0 comments on commit 5fb24b9

Please sign in to comment.