diff --git a/templates/repo/commit_author.tmpl b/templates/repo/commit_author.tmpl
index b08323840f..80823ea342 100644
--- a/templates/repo/commit_author.tmpl
+++ b/templates/repo/commit_author.tmpl
@@ -19,18 +19,17 @@
{{$username}}
{{else if .Author}}
- b
{{$username := ""}}
- {{if and .Author .Author.FullName DefaultShowFullName}}
+ {{if and .Author.FullName DefaultShowFullName}}
{{$username = .Author.FullName}}
{{else if .Author.Name}}
{{$username = .Author.Name}}
- {{else if and .Commit .Commit.Author .Commit.Author.Name}}
+ {{else if .Commit.Author.Name}}
{{$username = .Commit.Author.Name}}
{{end}}
{{ctx.AvatarUtils.AvatarByEmail .Author.Email $username .AvatarSize}}
- {{if and .Hack .Author.HomeLink}}
+ {{if .Author.HomeLink}}
{{$username}}
@@ -40,14 +39,14 @@
{{else}}
{{$username := ""}}
- {{if and .Commit .Commit.Author .Commit.Author.Name}}
+ {{if .Commit.Author.Name}}
{{$username = .Commit.Author.Name}}
{{else}}
{{$username = .Author.Name}}
{{end}}
{{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email $username .AvatarSize}}
- {{if and .Commit .Commit.Author .Commit.Author.Name}}
+ {{if .Commit.Author.Name}}
{{.Commit.Author.Name}}
{{else}}
{{.Author.Name}}