1
0
mirror of https://github.com/vercel/commerce.git synced 2025-05-16 14:36:59 +00:00

avoid malformed url with vendure ()

This commit is contained in:
Emilien Durieu 2021-12-22 20:44:26 +01:00 committed by GitHub
parent 4b2df2242c
commit c95f292743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,13 @@ export function normalizeSearchResult(item: SearchResultFragment): Product {
description: item.description,
slug: item.slug,
path: item.slug,
images: [{ url: item.productAsset?.preview + '?w=800&mode=crop' || '' }],
images: [
{
url: item.productAsset?.preview
? item.productAsset?.preview + '?w=800&mode=crop'
: '',
},
],
variants: [],
price: {
value: (item.priceWithTax as any).min / 100,