1
0

Fix subject rendering logic

This commit is contained in:
Tim Kächele 2020-12-11 11:19:13 +01:00
parent bd6f539efe
commit 7bd547141b

View File

@ -61,8 +61,11 @@ class CreateEmail
end end
def render_subject(template_version, personalization) def render_subject(template_version, personalization)
handlebars_renderer.render(template_version['subject'], subject_template = personalization['subject']
{ 'subject' => personalization['subject'] }) subject_template = template_version['subject'] if subject_template.blank?
handlebars_renderer.render(subject_template,
personalization['dynamic_template_data'])
end end
def render_html(template_version, personalization) def render_html(template_version, personalization)