From a4b61f8aab6257aebe79b522159ebde82e215c93 Mon Sep 17 00:00:00 2001 From: Umar Bolatov Date: Tue, 3 Sep 2019 21:07:09 -0700 Subject: [PATCH] [POS app] Allow empty string for product description (#1010) fix #1008 --- BTCPayServer/wwwroot/products/js/products.jquery.js | 2 +- BTCPayServer/wwwroot/products/js/products.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/wwwroot/products/js/products.jquery.js b/BTCPayServer/wwwroot/products/js/products.jquery.js index 189794be2..5f4440b4a 100644 --- a/BTCPayServer/wwwroot/products/js/products.jquery.js +++ b/BTCPayServer/wwwroot/products/js/products.jquery.js @@ -45,7 +45,7 @@ $(document).ready(function(){ // Only continue if price and title is provided if (obj.price && obj.title) { - if (description) { + if (description != null) { obj.description = products.escape(description); } if (image) { diff --git a/BTCPayServer/wwwroot/products/js/products.js b/BTCPayServer/wwwroot/products/js/products.js index 6dd54c976..debc48b14 100644 --- a/BTCPayServer/wwwroot/products/js/products.js +++ b/BTCPayServer/wwwroot/products/js/products.js @@ -68,7 +68,7 @@ Products.prototype.loadFromTemplate = function() { 'title': title, 'price': price, 'image': image || null, - 'description': description || null, + 'description': description || '', 'custom': Boolean(custom), 'inventory': isNaN(inventory)? null: inventory });