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,
|
descriptionHtml: description,
|
||||||
slug: permalink,
|
slug: permalink,
|
||||||
path: `/${permalink}`,
|
path: `/${permalink}`,
|
||||||
images: assets.map(({ url, description, filename }) => ({
|
images:
|
||||||
url,
|
assets?.map(({ url, description, filename }) => ({
|
||||||
alt: description || filename,
|
url,
|
||||||
})),
|
alt: description || filename,
|
||||||
|
})) || [],
|
||||||
price: {
|
price: {
|
||||||
value: price.raw,
|
value: price.raw,
|
||||||
currencyCode: 'USD',
|
currencyCode: 'USD',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user