aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-01-23 21:07:23 +0000
committerAdam Soltys <[email protected]>2024-01-23 21:07:23 +0000
commit05967b7d4b004860113ea44cf1b01b9135437f1e (patch)
tree6aa9877a90e1b70612e387a0b799f5eadcbb4b30
parent517065e5bd34f7e1d5c27ce8c86476cd0810636a (diff)
downloadcoinos-server-05967b7d4b004860113ea44cf1b01b9135437f1e.tar.gz
coinos-server-05967b7d4b004860113ea44cf1b01b9135437f1e.zip
handle null payments
-rw-r--r--routes/users.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/users.js b/routes/users.js
index 87d94f12..69319ba2 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -367,7 +367,7 @@ export default {
await Promise.all(
payments.reverse().map(async (id) => await g(`payment:${id}`)),
)
- ).filter((p) => p.type === types.internal && p.ref)) {
+ ).filter((p) => p && p.type === types.internal && p.ref)) {
let i = contacts.findIndex((c) => c && c.id === ref);
if (~i) contacts.splice(i, 1);
let u = await g(`user:${ref}`);