aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-02-02 00:25:22 +0000
committerAdam Soltys <[email protected]>2023-02-02 00:25:23 +0000
commit519dbafb119df5328490feae0f7f01624e0bd032 (patch)
tree36a38e19e87881a44aa9764ec5c4bed7b958162b
parentf07883cdae6da45b063c3b17843c75abf8128e4e (diff)
downloadcoinos-server-519dbafb119df5328490feae0f7f01624e0bd032.tar.gz
coinos-server-519dbafb119df5328490feae0f7f01624e0bd032.zip
check for undefined username
-rw-r--r--routes/payments.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/payments.js b/routes/payments.js
index c67e0f9b..400bb54d 100644
--- a/routes/payments.js
+++ b/routes/payments.js
@@ -24,7 +24,7 @@ export default {
let p;
- if (username.endsWith("@classic")) {
+ if (username && username.endsWith("@classic")) {
let { username: source } = user;
username = username.replace("@classic", "");
p = await debit(hash, amount, 0, memo, user, types.classic);