Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 812b292

Browse files
Missing null check
1 parent f0390f6 commit 812b292

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.App/Services/PullRequestService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public async Task<Page<PullRequestListItemModel>> ReadPullRequests(
214214
item.CommentCount += item.Reviews.Sum(x => x.Count);
215215
item.Reviews = null;
216216

217-
var checkRuns = item.LastCommit?.CheckSuites.SelectMany(model => model.CheckRuns).ToArray();
217+
var checkRuns = item.LastCommit?.CheckSuites?.SelectMany(model => model.CheckRuns).ToArray();
218218

219219
var hasCheckRuns = checkRuns?.Any() ?? false;
220220
var hasStatuses = item.LastCommit?.Statuses?.Any() ?? false;

0 commit comments

Comments
 (0)