Skip to content

Commit

Permalink
Handle null author in reviews and comments (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwouts authored Apr 26, 2021
1 parent 8a1f0bc commit 2333829
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/loading/internal/pull-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ async function updateCommentsAndReviews(
githubApi.loadPullRequestDetails(pr),
githubApi.loadReviews(pr).then((reviews) =>
reviews.map((review) => ({
authorLogin: review.user.login,
authorLogin: review.user ? review.user.login : "",
state: review.state,
submittedAt: review.submitted_at,
}))
),
githubApi.loadComments(pr).then((comments) =>
comments.map((comment) => ({
authorLogin: comment.user.login,
authorLogin: comment.user ? comment.user.login : "",
createdAt: comment.created_at,
}))
),
Expand Down

0 comments on commit 2333829

Please sign in to comment.