From ba392386cb439c634a7a11efbea9f7e3c834954b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 23 Feb 2024 23:08:40 +0000 Subject: check items length --- lib/payments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/payments.js b/lib/payments.js index ea17783b..f1b2ff46 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -209,7 +209,8 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => { // // console.log(items); - let items = formatReceipt(inv.items, inv.currency); + let items; + if (inv.items && inv.items.length) formatReceipt(inv.items, inv.currency); if (config.mqtt1) { mqtt1.publish( -- cgit v1.2.3