aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.ts')
-rw-r--r--lib/utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utils.ts b/lib/utils.ts
index 278a2c82..61277b10 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -80,7 +80,7 @@ export const getUser = async (username) => {
update = true;
}
- if (user.profile) {
+ if (user?.profile) {
user.picture = `https://coinos.io/api/public/${user.profile}.webp`;
delete user.profile;
@@ -90,7 +90,7 @@ export const getUser = async (username) => {
update = true;
}
- if (user.address) {
+ if (user?.address) {
user.about = user.address;
delete user.address;
update = true;