Fixed potential JS error when copying product with empty but not null description

This commit is contained in:
Bernd Bestel 2022-06-04 13:32:31 +02:00
parent cd41c27ee1
commit 1ef64025c5
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -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);
}