From 9d8466b595980143ba51f578e371a3262a57f9db Mon Sep 17 00:00:00 2001 From: Overtorment Date: Thu, 23 Jan 2020 23:09:50 +0000 Subject: [PATCH] FIX: invoice description decode --- class/User.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/class/User.js b/class/User.js index cf8a69e..60a4448 100644 --- a/class/User.js +++ b/class/User.js @@ -243,7 +243,11 @@ export class User { invoice.description = ''; for (let tag of decoded.tags) { if (tag.tagName === 'description') { - invoice.description += decodeURIComponent(tag.data); + try { + invoice.description += decodeURIComponent(tag.data); + } catch (_) { + invoice.description += tag.data; + } } if (tag.tagName === 'payment_hash') { invoice.payment_hash = tag.data;