mirror of
https://github.com/vercel/commerce.git
synced 2025-07-04 04:01:21 +00:00
Fix option values collection
This commit is contained in:
parent
c173b47ac9
commit
cfa72b080e
@ -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]
|
const expandedOptions = [...accumulatedOptions]
|
||||||
|
|
||||||
expandedOptions[existingOptionIndex] = {
|
expandedOptions[existingOptionIndex] = {
|
||||||
|
@ -12,7 +12,7 @@ const getMediaGallery = (
|
|||||||
) => string | null
|
) => string | null
|
||||||
) => {
|
) => {
|
||||||
return images.reduce<ProductImage[]>((productImages, _, imageIndex) => {
|
return images.reduce<ProductImage[]>((productImages, _, imageIndex) => {
|
||||||
const imageUrl = getImageUrl(images[imageIndex], 9001, 9001)
|
const imageUrl = getImageUrl(images[imageIndex], 800, 800)
|
||||||
|
|
||||||
if (imageUrl) {
|
if (imageUrl) {
|
||||||
return [
|
return [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user