Fix empty attribute values
This commit is contained in:
parent
3936e68a36
commit
04b22ab878
1 changed files with 3 additions and 3 deletions
|
@ -93,17 +93,17 @@ export function getAttributeInputFromProductType(
|
|||
}
|
||||
|
||||
export function getAttributeInputFromVariant(
|
||||
product: ProductVariant
|
||||
variant: ProductVariant
|
||||
): VariantAttributeInput[] {
|
||||
return maybe(
|
||||
(): VariantAttributeInput[] =>
|
||||
product.attributes.map(attribute => ({
|
||||
variant.attributes.map(attribute => ({
|
||||
data: {
|
||||
values: attribute.attribute.values
|
||||
},
|
||||
id: attribute.attribute.id,
|
||||
label: attribute.attribute.name,
|
||||
value: attribute.value.slug
|
||||
value: maybe(() => attribute.value.slug, null)
|
||||
})),
|
||||
[]
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue