Skip to content

Commit 9d53e72

Browse files
committed
improvement
1 parent dcffdb1 commit 9d53e72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templates/repo/diff/compare.tmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,10 @@
221221
{{end}}
222222
</div>
223223

224-
{{if or .CommitCount (not .DiffNotAvailable)}}
224+
{{$hasCommits := and .Commits (gt .CommitCount 0)}}
225+
{{if or $hasCommits (not .DiffNotAvailable)}}
225226
<div class="ui container fluid padded tw-my-4">
226-
{{if .CommitCount}}
227+
{{if $hasCommits}}
227228
{{template "repo/commits_table" .}}
228229
{{end}}
229230
{{if not .DiffNotAvailable}}

0 commit comments

Comments
 (0)