From 83a2669ff523b58a0c285528b379a221258be1cf Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Sun, 19 Feb 2023 23:56:02 -0500 Subject: [PATCH] fix(web): user profile 404 (#1800) --- .../navigation-bar/account-info-panel.svelte | 31 +++++++++-------- .../navigation-bar/navigation-bar.svelte | 33 ++++++++++--------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte b/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte index 1bf4aae8c8..821971ba26 100644 --- a/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte +++ b/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte @@ -16,7 +16,10 @@ }; const getUserProfileImage = async () => { - return await api.userApi.getProfileImage(user.id); + if (!user.profileImagePath) { + return null; + } + return api.userApi.getProfileImage(user.id).catch(() => null); }; @@ -32,18 +35,20 @@ diff --git a/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte b/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte index 5d219c7f4c..55dae7ec18 100644 --- a/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte +++ b/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte @@ -1,7 +1,7 @@