forked from crowetic/commerce
fix checkout url, product w/ no images error
This commit is contained in:
parent
9675be1546
commit
e7d0f56e85
@ -60,7 +60,7 @@ const normalizeProductOption = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const normalizeProductImages = (images: SwellImage[]) => {
|
const normalizeProductImages = (images: SwellImage[]) => {
|
||||||
if (!images) {
|
if (!images || images.length < 1) {
|
||||||
return [{ url: '/' }]
|
return [{ url: '/' }]
|
||||||
}
|
}
|
||||||
return images?.map(({ file, ...rest }: SwellImage) => ({
|
return images?.map(({ file, ...rest }: SwellImage) => ({
|
||||||
|
@ -7,7 +7,7 @@ const {
|
|||||||
const provider = commerce.provider || getProviderName()
|
const provider = commerce.provider || getProviderName()
|
||||||
const isBC = provider === 'bigcommerce'
|
const isBC = provider === 'bigcommerce'
|
||||||
const isShopify = provider === 'shopify'
|
const isShopify = provider === 'shopify'
|
||||||
const isSwell = commerce.provider === 'swell'
|
const isSwell = provider === 'swell'
|
||||||
|
|
||||||
module.exports = withCommerceConfig({
|
module.exports = withCommerceConfig({
|
||||||
commerce,
|
commerce,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user