Skip to content

Commit

Permalink
Merge pull request #6 from FAIMS/fix-null-revision-bug
Browse files Browse the repository at this point in the history
Fix null revision bug
  • Loading branch information
stevecassidy authored Jun 9, 2024
2 parents 3774286 + 21378d6 commit 9636e49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
8 changes: 4 additions & 4 deletions src/data_storage/internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9636e49

Please sign in to comment.