From fd2e5140bc7f940f585abae7984a17e2c389464f Mon Sep 17 00:00:00 2001 From: NISHIZAWA Shuntaro Date: Sat, 12 Oct 2024 23:41:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A9=B2=E5=BD=93=E3=81=AE=E3=83=A6?= =?UTF-8?q?=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=8C=E3=81=84=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=81=A8=E3=81=8D=E3=81=AB=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AB?= =?UTF-8?q?=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hooks/useMyProfile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/hooks/useMyProfile.ts b/app/hooks/useMyProfile.ts index 9b4a6c7..3db321b 100644 --- a/app/hooks/useMyProfile.ts +++ b/app/hooks/useMyProfile.ts @@ -17,8 +17,8 @@ export function useMyProfile(): SWRResponse { .eq("id", id) .limit(1); - if (!data) return null; - const rawProfile = data[0]; + const rawProfile = data?.[0]; + if (!rawProfile) return null; return { id: rawProfile.id,