diff --git a/framework/spree/utils/expandOptions.ts b/framework/spree/utils/expandOptions.ts index 455354608..105f7d947 100644 --- a/framework/spree/utils/expandOptions.ts +++ b/framework/spree/utils/expandOptions.ts @@ -73,8 +73,17 @@ const expandOptions = ( } } - const expandedOptionValues = [...option.values, optionValue] + if (existingOptionIndex === -1) { + return [ + ...accumulatedOptions, + { + ...option, + values: [optionValue], + }, + ] + } + const expandedOptionValues = [...option.values, optionValue] const expandedOptions = [...accumulatedOptions] expandedOptions[existingOptionIndex] = { diff --git a/framework/spree/utils/getMediaGallery.ts b/framework/spree/utils/getMediaGallery.ts index fe5587aa2..e697562d4 100644 --- a/framework/spree/utils/getMediaGallery.ts +++ b/framework/spree/utils/getMediaGallery.ts @@ -12,7 +12,7 @@ const getMediaGallery = ( ) => string | null ) => { return images.reduce((productImages, _, imageIndex) => { - const imageUrl = getImageUrl(images[imageIndex], 9001, 9001) + const imageUrl = getImageUrl(images[imageIndex], 800, 800) if (imageUrl) { return [