From 547f75d19cb08cd0eac6978cb9a6eb107a563edd Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Sat, 17 Feb 2024 16:22:05 +0100 Subject: [PATCH] fix: crash with no user in session --- apps/nextjs/src/components/user-avatar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/nextjs/src/components/user-avatar.tsx b/apps/nextjs/src/components/user-avatar.tsx index 0c3e5bd39..0a4db570e 100644 --- a/apps/nextjs/src/components/user-avatar.tsx +++ b/apps/nextjs/src/components/user-avatar.tsx @@ -14,7 +14,7 @@ export const UserAvatar = async ({ size }: UserAvatarProps) => { color: "primaryColor", } satisfies Partial; - if (!currentSession) return ; + if (!currentSession?.user) return ; if (currentSession.user.image) return (