Fix nil tpl when campaign body is empty. Closes #1085.

This commit is contained in:
Kailash Nadh 2022-12-06 19:47:05 +05:30
parent 448f0e3428
commit a555fd3876

View file

@ -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 {