Handle empty input in variant creation
This commit is contained in:
parent
7aebb67cfd
commit
264f2ba8c8
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ export const ProductVariant: React.FC<ProductVariantCreateProps> = ({
|
|||
product: productId,
|
||||
sku: formData.sku,
|
||||
stocks: formData.stocks.map(stock => ({
|
||||
quantity: parseInt(stock.value, 0),
|
||||
quantity: parseInt(stock.value, 0) || 0,
|
||||
warehouse: stock.id
|
||||
})),
|
||||
trackInventory: true,
|
||||
|
|
Loading…
Reference in a new issue