Formatting

This commit is contained in:
2025-10-11 15:16:58 -07:00
parent e9d88fdce8
commit d1432d048f

View File

@@ -36,8 +36,10 @@ export function DocumentLoader({
relationships: doc.expand?.relationships_via_primary || [], relationships: doc.expand?.relationships_via_primary || [],
relatedDocuments: relatedDocuments:
doc.expand?.relationships_via_primary?.flatMap( doc.expand?.relationships_via_primary?.flatMap(
// Note: If there are no entries in the expanded secondaries there just won't be an entry instead of an empty list. (r: RecordModel): AnyDocument[] =>
(r: RecordModel) => r.expand?.secondary ?? [], // Note: If there are no entries in the expanded secondaries there
// just won't be an entry instead of an empty list.
r.expand?.secondary ?? [],
) ?? [], ) ?? [],
}); });
} }