Skip to content

Commit dd4ff2f

Browse files
committed
fix: @nuxt/content v3.7 compatibility
1 parent 5e4a654 commit dd4ff2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/content.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ export const schema = z.object({
55
robots: z.union([z.string(), z.boolean()]).optional(),
66
})
77

8-
export function asRobotsCollection<T extends Collection<any>>(collection: T): T {
8+
export function asRobotsCollection<T>(collection: Collection<T>): Collection<T> {
99
if (collection.type === 'page') {
10+
// @ts-expect-error untyped
1011
collection.schema = collection.schema ? schema.extend(collection.schema.shape) : schema
1112
}
1213
return collection

0 commit comments

Comments
 (0)