Skip to content

Commit

Permalink
fix: 該当のユーザーがいないときにエラーになってしまう問題を修正 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
shun-shobon authored Oct 12, 2024
2 parents a83f8cf + fd2e514 commit 70919c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/hooks/useMyProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export function useMyProfile(): SWRResponse<Profile | null> {
.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,
Expand Down

0 comments on commit 70919c9

Please sign in to comment.