4
0
forked from crowetic/commerce

fix checkout url, product w/ no images error

This commit is contained in:
Greg Hoskin 2021-05-12 11:23:04 -05:00
parent 9675be1546
commit e7d0f56e85
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ const normalizeProductOption = ({
}
const normalizeProductImages = (images: SwellImage[]) => {
if (!images) {
if (!images || images.length < 1) {
return [{ url: '/' }]
}
return images?.map(({ file, ...rest }: SwellImage) => ({

View File

@ -7,7 +7,7 @@ const {
const provider = commerce.provider || getProviderName()
const isBC = provider === 'bigcommerce'
const isShopify = provider === 'shopify'
const isSwell = commerce.provider === 'swell'
const isSwell = provider === 'swell'
module.exports = withCommerceConfig({
commerce,