4
0
forked from crowetic/commerce

fix error from missing product imgages

This commit is contained in:
Greg Hoskin 2021-05-16 13:31:57 -07:00
parent 470a877bf1
commit c8cf6e733c

View File

@ -198,7 +198,10 @@ function normalizeLineItem({
sku: variant?.sku ?? '',
name: variant?.name!,
image: {
url: product && product.images ? product?.images[0].file.url : '',
url:
product?.images && product.images.length > 0
? product?.images[0].file.url
: '/',
},
requiresShipping: false,
price: price,