fix: crash with no user in session

This commit is contained in:
Manuel
2024-02-17 16:22:05 +01:00
parent 3bdd117659
commit 547f75d19c

View File

@@ -14,7 +14,7 @@ export const UserAvatar = async ({ size }: UserAvatarProps) => {
color: "primaryColor",
} satisfies Partial<AvatarProps>;
if (!currentSession) return <Avatar {...commonProps} />;
if (!currentSession?.user) return <Avatar {...commonProps} />;
if (currentSession.user.image)
return (
<Avatar