0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-17 23:11:29 -05:00

Fix references test

This commit is contained in:
Matthew Phillips 2024-02-09 15:40:36 -05:00
parent 1d42585f24
commit 85f8ca24c1

View file

@ -211,8 +211,8 @@ export const collectionsSchema = z.preprocess((rawCollections) => {
// Used to track collection info for references.
const { fields } = z.object({ fields: z.record(z.any()) }).parse(collection, { errorMap });
for (const [fieldName, field] of Object.entries(fields)) {
field.name = fieldName;
field.collection = collectionName;
field.schema.name = fieldName;
field.schema.collection = collectionName;
}
}
return rawCollections;