diff options
| -rw-r--r-- | routes/payments.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/payments.js b/routes/payments.js index 8857b355..1e1a495a 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -185,7 +185,7 @@ export default { async pot({ params: { name } }, res) { let amount = await g(`pot:${name}`); - if (typeof amount === 'undefined') return bail(res, "pot not found"); + if (typeof amount === 'undefined' || amount === null) return bail(res, "pot not found"); let payments = (await db.lRange(`pot:${name}:payments`, 0, -1)) || []; payments = await Promise.all(payments.map(hash => g(`payment:${hash}`))); |
