Skip to content

Commit

Permalink
Merge pull request #5 from FAIMS/fix-bad-save-message
Browse files Browse the repository at this point in the history
Guard against empty revision
  • Loading branch information
stevecassidy committed Jun 9, 2024
2 parents 7ea54bb + 3db5667 commit 3774286
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/data_storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ export async function getSomeRecords(
});
if (filter_deleted) {
record_list = record_list.filter((record: any) => {
return !record.revision.deleted;
// guarding against there being no revision which should not happen but has
return !record.revision?.deleted;
});
}
// don't return the first record if we have a bookmark
Expand Down

0 comments on commit 3774286

Please sign in to comment.