From 222b58db5107bca39f7b2d9393275f67e6471e62 Mon Sep 17 00:00:00 2001 From: NookieGrey Date: Sun, 23 Feb 2025 22:22:13 +0400 Subject: [PATCH] fix null pointer --- src/components/Header/Avatar/Avatar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Header/Avatar/Avatar.tsx b/src/components/Header/Avatar/Avatar.tsx index 9c64b94..4068fd1 100644 --- a/src/components/Header/Avatar/Avatar.tsx +++ b/src/components/Header/Avatar/Avatar.tsx @@ -25,7 +25,9 @@ export function Avatar() { shape="circle" onClick={() => navigate( - (profile.data as UserProfileDto).userId ? "/profile" : "/auth/signIn", + (profile.data as UserProfileDto)?.userId + ? "/profile" + : "/auth/signIn", ) } >