diff --git a/spr/spr.go b/spr/spr.go index 7058eeb..4adbbb2 100644 --- a/spr/spr.go +++ b/spr/spr.go @@ -468,7 +468,7 @@ func sortPullRequestsByLocalCommitOrder(pullRequests []*github.PullRequest, loca var sortedPullRequests []*github.PullRequest for _, commit := range localCommits { - if !commit.WIP { + if !commit.WIP && pullRequestMap[commit.CommitID] != nil { sortedPullRequests = append(sortedPullRequests, pullRequestMap[commit.CommitID]) } }