diff options
| author | Adam Soltys <[email protected]> | 2024-02-23 23:08:40 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-02-23 23:08:40 +0000 |
| commit | ba392386cb439c634a7a11efbea9f7e3c834954b (patch) | |
| tree | 572097fa830c11cbe94051557f4c382d86ff6616 /lib | |
| parent | 92e7cf4c2f24c9a0f355fa61b271b6bd22b2016e (diff) | |
| download | coinos-server-ba392386cb439c634a7a11efbea9f7e3c834954b.tar.gz coinos-server-ba392386cb439c634a7a11efbea9f7e3c834954b.zip | |
check items length
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/payments.js | 3 |
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( |
