diff options
| author | Adam Soltys <[email protected]> | 2024-12-31 15:26:52 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-12-31 15:26:52 -0800 |
| commit | a323fa03caf05332cfd0f72539532b9a2ed86221 (patch) | |
| tree | a96d6bb85c6ebc8b383826b0c251a6c95be260c5 | |
| parent | e2eb8a2b1a99afc8d6bc5c7a8124496ecde865c7 (diff) | |
| download | coinos-server-a323fa03caf05332cfd0f72539532b9a2ed86221.tar.gz coinos-server-a323fa03caf05332cfd0f72539532b9a2ed86221.zip | |
check for user
| -rw-r--r-- | lib/utils.ts | 4 |
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; |
