mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix m2o returning as array
This commit is contained in:
@@ -202,6 +202,10 @@ function removeTemporaryFields(rawItems: Item[], ast: AST | NestedCollectionAST)
|
||||
|
||||
for (const nestedCollection of nestedCollections) {
|
||||
item[nestedCollection.fieldKey] = removeTemporaryFields(rawItem[nestedCollection.fieldKey], nestedCollection);
|
||||
|
||||
if (isM2O(nestedCollection)) {
|
||||
item[nestedCollection.fieldKey] = item[nestedCollection.fieldKey][0];
|
||||
}
|
||||
}
|
||||
|
||||
items.push(item);
|
||||
|
||||
Reference in New Issue
Block a user