aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-12-28 18:43:04 +0000
committerAdam Soltys <[email protected]>2022-12-28 18:43:04 +0000
commitdf3f91fbc6d0b75c4c875c787d8ab29b2f1d2768 (patch)
tree8d1e058404cdd1764a7c2f289fa8da9e2349f06f /lib
parent204c47baa30e1ee4b1ff27b0abd58a7a5cf47db7 (diff)
downloadcoinos-server-df3f91fbc6d0b75c4c875c787d8ab29b2f1d2768.tar.gz
coinos-server-df3f91fbc6d0b75c4c875c787d8ab29b2f1d2768.zip
handle empty follows
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 49f95a00..6a4bc1b2 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -65,7 +65,7 @@ export const getUser = async (username, transaction) => {
});
await wait(() => !store.fetching[pubkey], 100, 10);
- user.follows = JSON.parse(await redis.get(`${pubkey}:follows`));
+ user.follows = JSON.parse(await redis.get(`${pubkey}:follows`)) || [];
user.followers = await redis.sMembers(`${pubkey}:followers`);
}