From 264f2ba8c8dbb7b6232b9037d42f10400b52c3db Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Tue, 13 Oct 2020 15:54:35 +0200 Subject: [PATCH] Handle empty input in variant creation --- src/products/views/ProductVariantCreate.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/products/views/ProductVariantCreate.tsx b/src/products/views/ProductVariantCreate.tsx index 80516e2b2..91041ba4f 100644 --- a/src/products/views/ProductVariantCreate.tsx +++ b/src/products/views/ProductVariantCreate.tsx @@ -99,7 +99,7 @@ export const ProductVariant: React.FC = ({ 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,