From d6a1aa50095fda8419f6574a6d008c29745dfef0 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Tue, 10 Jan 2023 14:20:46 +0000 Subject: [PATCH] fix error when no categories are defined --- lnbits/extensions/market/templates/market/index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lnbits/extensions/market/templates/market/index.html b/lnbits/extensions/market/templates/market/index.html index c6227023f..77e3acced 100644 --- a/lnbits/extensions/market/templates/market/index.html +++ b/lnbits/extensions/market/templates/market/index.html @@ -802,9 +802,11 @@ var link = _.findWhere(self.products, {id: linkId}) self.productDialog.data = _.clone(link._data) - self.productDialog.data.categories = self.productDialog.data.categories.split( - ',' - ) + if (self.productDialog.data.categories) { + self.productDialog.data.categories = self.productDialog.data.categories.split( + ',' + ) + } if (self.productDialog.data.image.startsWith('data:')) { self.productDialog.url = false }