Skip to content

Commit

Permalink
avoid malformed url with vendure (vercel#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilienD authored Dec 22, 2021
1 parent 4b2df22 commit c95f292
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion framework/vendure/utils/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c95f292

Please sign in to comment.