diff --git a/package.json b/package.json index 832b50e..a49314e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faims3-datamodel", - "version": "1.1.5", + "version": "1.1.6", "description": "Database access layer for FAIMS3", "main": "./build/src/index.js", "exports": { diff --git a/src/data_storage/internals.ts b/src/data_storage/internals.ts index d87ec70..2084548 100644 --- a/src/data_storage/internals.ts +++ b/src/data_storage/internals.ts @@ -249,14 +249,14 @@ export async function listRecordMetadata( for (const [record_id, record] of records) { const revision_id = record.heads[0]; const revision = revisions[revision_id]; - if (revision === undefined) { + if (!revision) { // We don't have that revision, so skip continue; } const hrid = - revision === undefined - ? record_id - : (await getHRID(project_id, revision)) ?? record_id; + revision + ? (await getHRID(project_id, revision)) ?? record_id + : record_id; out[record_id] = { project_id: project_id,