Formatting
This commit is contained in:
@@ -36,8 +36,10 @@ export function DocumentLoader({
|
||||
relationships: doc.expand?.relationships_via_primary || [],
|
||||
relatedDocuments:
|
||||
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) => r.expand?.secondary ?? [],
|
||||
(r: RecordModel): AnyDocument[] =>
|
||||
// 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 ?? [],
|
||||
) ?? [],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user