From 1ef64025c5b8b6e88c3aae510ac3db486e22b8e0 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 4 Jun 2022 13:32:31 +0200 Subject: [PATCH] Fixed potential JS error when copying product with empty but not null description --- 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 59a6bca8..eae94191 100644 --- a/public/viewjs/productform.js +++ b/public/viewjs/productform.js @@ -471,7 +471,7 @@ if (Grocy.EditMode == "create" && GetUriParam("copy-of") != undefined) { Grocy.Components.ProductPicker.SetId(sourceProduct.parent_product_id); } - if (sourceProduct.description != null) + if (sourceProduct.description != null && !sourceProduct.description.isEmpty()) { $("#description").summernote("pasteHTML", sourceProduct.description); }