aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/payments.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/payments.ts b/routes/payments.ts
index c8fd07dd..5a6eba91 100644
--- a/routes/payments.ts
+++ b/routes/payments.ts
@@ -157,9 +157,10 @@ export default {
params: { hash },
} = req;
const p = await getPayment(hash);
- if (p.type === types.internal) p.with = await g(`user:${p.ref}`);
+ if (p?.type === types.internal) p.with = await g(`user:${p.ref}`);
res.send(p);
} catch (e) {
+ console.log(e);
err("failed to get payment", e.message);
bail(res, e.message);
}