docs: fix selected variant in storefront guide (#10785)
This commit is contained in:
@@ -81,7 +81,7 @@ export default function Product({ params: { id } }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return product.variants.find((variant) => variant.options?.every(
|
return product.variants.find((variant) => variant.options?.every(
|
||||||
(optionValue) => optionValue.value === selectedOptions[optionValue.option_id!]
|
(optionValue) => optionValue.id === selectedOptions[optionValue.option_id!]
|
||||||
))
|
))
|
||||||
}, [selectedOptions, product])
|
}, [selectedOptions, product])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user