Fix childNode fetching

This commit is contained in:
rijkvanzanten
2021-09-13 14:13:52 -04:00
parent 8c00469a24
commit 57de1780dd

View File

@@ -163,7 +163,11 @@ async function parseCurrentLevel(
const fieldNodes = columnsToSelect.map(
(column: string) =>
children.find((childNode) => childNode.fieldKey === column) ?? { type: 'field', name: column, fieldKey: column }
children.find((childNode) => childNode.type === 'field' && childNode.fieldKey === column) ?? {
type: 'field',
name: column,
fieldKey: column,
}
) as FieldNode[];
return { fieldNodes, nestedCollectionNodes, primaryKeyField };