mirror of
https://github.com/vercel/commerce.git
synced 2025-06-18 21:21:21 +00:00
Update helpers.ts
This commit is contained in:
parent
f84922d937
commit
59dedf58cc
@ -15,9 +15,9 @@ export function getVariant(product: Product, opts: SelectedOptions) {
|
|||||||
) {
|
) {
|
||||||
return option.values.find((v) => v.label.toLowerCase() === value)
|
return option.values.find((v) => v.label.toLowerCase() === value)
|
||||||
} else if (!value) {
|
} else if (!value) {
|
||||||
return !variant.options.filter(
|
return !variant.options.find(
|
||||||
({ displayName }) => displayName.toLowerCase() === key
|
(v) => v.displayName.toLowerCase() === key
|
||||||
).length
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user