diff --git a/framework/swell/utils/normalize.ts b/framework/swell/utils/normalize.ts index a7a7be1ce..cc8eafdb7 100644 --- a/framework/swell/utils/normalize.ts +++ b/framework/swell/utils/normalize.ts @@ -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) => ({ diff --git a/next.config.js b/next.config.js index 1e1b1a126..e17d3e5c4 100644 --- a/next.config.js +++ b/next.config.js @@ -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,