diff --git a/bids-validator/src/schema/associations.ts b/bids-validator/src/schema/associations.ts index db42a6732..e6ccaabaf 100644 --- a/bids-validator/src/schema/associations.ts +++ b/bids-validator/src/schema/associations.ts @@ -82,11 +82,12 @@ const associationLookup = { inherit: true, load: async (file: BIDSFile): Promise => { const contents = await file.text() - const columns = parseBvalBvec(contents) + const rows = parseBvalBvec(contents) return { path: file.path, - n_cols: columns ? columns[0].length : 0, - n_rows: columns ? columns.length : 0, + n_cols: rows ? rows[0].length : 0, + n_rows: rows ? rows.length : 0, + values: rows[0], } }, }, @@ -96,11 +97,11 @@ const associationLookup = { inherit: true, load: async (file: BIDSFile): Promise => { const contents = await file.text() - const columns = parseBvalBvec(contents) + const rows = parseBvalBvec(contents) return { path: file.path, - n_cols: columns ? columns[0].length : 0, - n_rows: columns ? columns.length : 0, + n_cols: rows ? rows[0].length : 0, + n_rows: rows ? rows.length : 0, } }, }, diff --git a/bids-validator/src/types/context.ts b/bids-validator/src/types/context.ts index 4b03fcbee..de2c1ac69 100644 --- a/bids-validator/src/types/context.ts +++ b/bids-validator/src/types/context.ts @@ -44,6 +44,7 @@ export interface ContextAssociationsBval { path: string n_cols: number n_rows: number + values: number[] } export interface ContextAssociationsBvec { path: string