Skip to content

Commit

Permalink
fix(dashboard): updated variant title is used when creating product (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
riqwan authored Nov 19, 2024
1 parent a1738f8 commit 2783bed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2783bed

Please sign in to comment.