Added the options for a variant to the product page

This commit is contained in:
royderks
2021-04-20 15:58:40 +02:00
committed by Zaiste
parent c26c6889b4
commit e3a9fd6c51
3 changed files with 60 additions and 56 deletions

View File

@@ -9,7 +9,9 @@ export function getVariant(product: Product, opts: SelectedOptions) {
option.__typename === 'MultipleChoiceOption' &&
option.displayName.toLowerCase() === key.toLowerCase()
) {
return option.values.find((v) => v.label.toLowerCase() === value)
return option.values.find((v) => {
return v.label.toLowerCase() === value
})
}
})
)