Skip to content

Commit d60b5f1

Browse files
author
Gusted
authored
Fix commit's time (#18375) (#18409)
- Backport of #18375
1 parent f7f4129 commit d60b5f1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

templates/repo/commits_list.tmpl

+5-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@
7676
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
7777
{{end}}
7878
</td>
79-
<td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
79+
{{if .Committer}}
80+
<td class="text right aligned">{{TimeSince .Committer.When $.Lang}}</td>
81+
{{else}}
82+
<td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
83+
{{end}}
8084
</tr>
8185
{{end}}
8286
</tbody>

templates/repo/view_list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{{end}}
3131
</span>
3232
</th>
33-
<th class="text grey right age">{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}</th>
33+
<th class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{TimeSince .LatestCommit.Committer.When $.Lang}}{{end}}{{end}}</th>
3434
</tr>
3535
</thead>
3636
<tbody>

0 commit comments

Comments
 (0)