Skip to content

Commit

Permalink
implemented another suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
patchlog committed Sep 24, 2021
1 parent 9907582 commit c93354c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ TemplateGenerator.prototype.render = function render(mail, cb) {

var templatePath = path.join(this.viewPath, mail.data.template + this.extName);
var textTemplatePath='';
if (!!mail.data.text_template)textTemplatePath=path.join(this.viewPath, mail.data.text_template + this.extName);
if (!!mail.data.text_template) {
textTemplatePath=path.join(this.viewPath, mail.data.text_template + this.extName);
}
var viewEngine=this.viewEngine;
this.viewEngine.renderView(templatePath, mail.data.context, function(err, body) {
if (err) return cb(err);
Expand Down

0 comments on commit c93354c

Please sign in to comment.