Skip to content

Commit

Permalink
fix: check if emails exist in github userinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-lepikhin committed Feb 18, 2025
1 parent ec57440 commit 4b8605a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/providers/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ export default function GitHub(

if (res.ok) {
const emails: GitHubEmail[] = await res.json()
profile.email = (emails.find((e) => e.primary) ?? emails[0]).email
if (emails.length) {
profile.email = (emails.find((e) => e.primary) ?? emails[0]).email
}
}
}

Expand Down

0 comments on commit 4b8605a

Please sign in to comment.