mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 14:16:19 +00:00
no asumir que offers es solo length===1
This commit is contained in:
parent
db008c582f
commit
71e66cf437
1 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@ const zProductLd = z.object({
|
|||
name: z.string(),
|
||||
image: z.string(),
|
||||
offers: z.object({
|
||||
offers: z.tuple([
|
||||
offers: z.array(
|
||||
z.object({
|
||||
"@type": z.literal("Offer"),
|
||||
price: z.number(),
|
||||
|
@ -41,8 +41,8 @@ const zProductLd = z.object({
|
|||
"http://schema.org/OutOfStock",
|
||||
"http://schema.org/InStock",
|
||||
]),
|
||||
}),
|
||||
]),
|
||||
})
|
||||
),
|
||||
}),
|
||||
});
|
||||
type ProductLd = z.infer<typeof zProductLd>;
|
||||
|
|
Loading…
Reference in a new issue