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

Commit 0036c62

Browse files
Fixing error that occurs if there are no statuses configured
1 parent 866992f commit 0036c62

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
@@ -157,7 +157,7 @@ public async Task<Page<PullRequestListItemModel>> ReadPullRequests(
157157
var checkRuns = item.LastCommit?.CheckSuites.SelectMany(model => model.CheckRuns).ToArray();
158158

159159
var hasCheckRuns = checkRuns?.Any() ?? false;
160-
var hasStatuses = item.LastCommit?.Statuses.Any() ?? false;
160+
var hasStatuses = item.LastCommit?.Statuses?.Any() ?? false;
161161

162162
if (!hasCheckRuns && !hasStatuses)
163163
{

0 commit comments

Comments
 (0)