File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed
Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -320,9 +320,6 @@ func PrepareCompareDiff(
320320 compareInfo .Commits = models .ParseCommitsWithStatus (compareInfo .Commits , headRepo )
321321 ctx .Data ["Commits" ] = compareInfo .Commits
322322 ctx .Data ["CommitCount" ] = compareInfo .Commits .Len ()
323- if ctx .Data ["CommitCount" ] == 0 {
324- ctx .Data ["PageIsComparePull" ] = false
325- }
326323
327324 if compareInfo .Commits .Len () == 1 {
328325 c := compareInfo .Commits .Front ().Value .(models.SignCommitWithStatuses )
Original file line number Diff line number Diff line change 5959
6060 {{if .IsNothingToCompare}}
6161 <div class="ui segment">{{.i18n.Tr "repo.pulls.nothing_to_compare"}}</div>
62- {{else if .PageIsComparePull}}
62+ {{else if and .PageIsComparePull (gt .CommitCount 0) }}
6363 {{if .HasPullRequest}}
6464 <div class="ui segment">
6565 {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
You can’t perform that action at this time.
0 commit comments