fix(dashboard): updated variant title is used when creating product (#10155)

This commit is contained in:
Riqwan Thamir
2024-11-19 16:22:34 +01:00
committed by GitHub
parent a1738f823c
commit 2783bed8ae
2 changed files with 1 additions and 3 deletions

View File

@@ -25,7 +25,6 @@ const ProductCreateVariantSchema = z.object({
weight: optionalInt,
material: z.string().optional(),
origin_country: z.string().optional(),
custom_title: z.string().optional(),
sku: z.string().optional(),
manage_inventory: z.boolean().optional(),
allow_backorder: z.boolean().optional(),

View File

@@ -53,8 +53,7 @@ export const normalizeVariants = (
regionsCurrencyMap: Record<string, string>
) => {
return variants.map((variant) => ({
title:
variant.custom_title || Object.values(variant.options || {}).join(" / "),
title: variant.title || Object.values(variant.options || {}).join(" / "),
options: variant.options,
sku: variant.sku || undefined,
manage_inventory: !!variant.manage_inventory,