From 66ed6bbafc81a1435d281a4515e5381c8d813f6b Mon Sep 17 00:00:00 2001 From: Alexander Sagen Date: Sun, 13 Mar 2022 19:21:12 +0100 Subject: [PATCH] Fix product creation --- public/viewjs/productform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/viewjs/productform.js b/public/viewjs/productform.js index 86a628f0..e75e69a6 100644 --- a/public/viewjs/productform.js +++ b/public/viewjs/productform.js @@ -62,7 +62,7 @@ $('.save-product-button').on('click', function(e) { jsonData.parent_product_id = parentProductId; Grocy.FrontendHelpers.BeginUiBusy("product-form"); - if (jsonData.parent_product_id.toString().isEmpty()) { + if ((jsonData.parent_product_id || '').toString().isEmpty()) { jsonData.parent_product_id = null; }