mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 15:06:59 +00:00
Fix normalizer, since assets is optional now.
This commit is contained in:
parent
c75b0fc001
commit
f4da360f12
@ -61,10 +61,11 @@ export function normalizeProduct(
|
||||
descriptionHtml: description,
|
||||
slug: permalink,
|
||||
path: `/${permalink}`,
|
||||
images: assets.map(({ url, description, filename }) => ({
|
||||
images:
|
||||
assets?.map(({ url, description, filename }) => ({
|
||||
url,
|
||||
alt: description || filename,
|
||||
})),
|
||||
})) || [],
|
||||
price: {
|
||||
value: price.raw,
|
||||
currencyCode: 'USD',
|
||||
|
Loading…
x
Reference in New Issue
Block a user