From a323fa03caf05332cfd0f72539532b9a2ed86221 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 31 Dec 2024 15:26:52 -0800 Subject: check for user --- lib/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/utils.ts') 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; -- cgit v1.2.3