Skip to content

Commit

Permalink
Fix nil tpl when campaign body is empty. Closes #1085.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Dec 6, 2022
1 parent 448f0e3 commit a555fd3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions models/models.go
Expand Up @@ -493,11 +493,6 @@ func (c *Campaign) CompileTemplate(f template.FuncMap) error {
c.SubjectTpl = subjTpl
}

// No template or body. Nothing to compile.
if c.TemplateBody == "" || c.Body == "" {
return nil
}

// Compile the base template.
body := c.TemplateBody
for _, r := range regTplFuncs {
Expand Down

0 comments on commit a555fd3

Please sign in to comment.