Skip to content

Commit

Permalink
fix(providers): add optional chaining to avoid nullish reference erro…
Browse files Browse the repository at this point in the history
…rs (#4365)
  • Loading branch information
yisu-kim committed Apr 14, 2022
1 parent 58d06ed commit 59daa0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next-auth/src/providers/kakao.ts
Expand Up @@ -82,9 +82,9 @@ export default function Kakao<P extends Record<string, any> = KakaoProfile>(
profile(profile) {
return {
id: profile.id,
name: profile.kakao_account?.profile.nickname,
name: profile.kakao_account?.profile?.nickname,
email: profile.kakao_account?.email,
image: profile.kakao_account?.profile.profile_image_url,
image: profile.kakao_account?.profile?.profile_image_url,
}
},
options,
Expand Down

0 comments on commit 59daa0e

Please sign in to comment.