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(
320
320
compareInfo .Commits = models .ParseCommitsWithStatus (compareInfo .Commits , headRepo )
321
321
ctx .Data ["Commits" ] = compareInfo .Commits
322
322
ctx .Data ["CommitCount" ] = compareInfo .Commits .Len ()
323
- if ctx .Data ["CommitCount" ] == 0 {
324
- ctx .Data ["PageIsComparePull" ] = false
325
- }
326
323
327
324
if compareInfo .Commits .Len () == 1 {
328
325
c := compareInfo .Commits .Front ().Value .(models.SignCommitWithStatuses )
Original file line number Diff line number Diff line change 59
59
60
60
{{if .IsNothingToCompare}}
61
61
<div class="ui segment">{{.i18n.Tr "repo.pulls.nothing_to_compare"}}</div>
62
- {{else if .PageIsComparePull}}
62
+ {{else if and .PageIsComparePull (gt .CommitCount 0) }}
63
63
{{if .HasPullRequest}}
64
64
<div class="ui segment">
65
65
{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
You can’t perform that action at this time.
0 commit comments