Skip to content

Commit

Permalink
Fix sending Opt-In emails when using custom templates
Browse files Browse the repository at this point in the history
  • Loading branch information
wmnnd committed Dec 12, 2023
1 parent 9a949a4 commit 26b5ddf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/keila/mailings/send_double_opt_in_mail_worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ defmodule Keila.Mailings.SendDoubleOptInMailWorker do
default_styles = Keila.Templates.HybridTemplate.styles()

styles =
if template do
Keila.Templates.Css.merge(default_styles, template.styles)
if template && is_binary(template.styles) do
Keila.Templates.Css.merge(default_styles, Keila.Templates.Css.parse!(template.styles))
else
default_styles
end
Expand Down

0 comments on commit 26b5ddf

Please sign in to comment.