Skip to content

Commit

Permalink
Fix nil pointer in default issue mail template (go-gitea#11862)
Browse files Browse the repository at this point in the history
* Fix nil pointer in default issue mail template

Fix: template: issue/default:20:17: executing "issue/default" at <.Comment.Type>: nil pointer evaluating interface {}.Type

Introduced in go-gitea#11167

* another one

Co-authored-by: zeripath <art27@cantab.net>
  • Loading branch information
2 people authored and Yohann Delafollye committed Jul 31, 2020
1 parent bb8eca3 commit bacc22e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/mail/issue/default.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<body>
{{if .IsMention}}<p><b>@{{.Doer.Name}}</b> mentioned you:</p>{{end}}
{{if eq .Comment.Type 29}}
{{if eq .ActionName "push"}}
<p>
<b>{{.Doer.Name}}</b>
{{if .Comment.IsForcePush}}
Expand Down Expand Up @@ -66,7 +66,7 @@
<div>{{.RenderedContent | Safe}}</div>
</div>
{{end -}}
{{if eq .Comment.Type 29}}
{{if eq .ActionName "push"}}
{{ $r:= List .Comment.Commits}}
<ul>
{{range $r}}
Expand Down

0 comments on commit bacc22e

Please sign in to comment.