aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/users.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/users.js b/routes/users.js
index 7598a8a6..5b76821d 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -221,7 +221,7 @@ export default {
}
if (pubkey) exists = await getUser(pubkey);
- if (username !== exists.username) {
+ if (exists && username !== exists.username) {
warn("key in use", pubkey, exists.username);
if (exists.anon) await db.del(`user:${pubkey}`);
else fail("Key in use by another account");