aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-02-23 23:08:40 +0000
committerAdam Soltys <[email protected]>2024-02-23 23:08:40 +0000
commitba392386cb439c634a7a11efbea9f7e3c834954b (patch)
tree572097fa830c11cbe94051557f4c382d86ff6616 /lib
parent92e7cf4c2f24c9a0f355fa61b271b6bd22b2016e (diff)
downloadcoinos-server-ba392386cb439c634a7a11efbea9f7e3c834954b.tar.gz
coinos-server-ba392386cb439c634a7a11efbea9f7e3c834954b.zip
check items length
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.js3
1 files changed, 2 insertions, 1 deletions
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(