Skip to content

Commit

Permalink
Merge pull request #1085 from amitailanciano/throw-css-inline-errors
Browse files Browse the repository at this point in the history
don't ignore css-inline exceptions
  • Loading branch information
juandav authored Jan 30, 2024
2 parents 2a7fbd2 + 71c77c6 commit 5d90fc8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/adapters/ejs.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ export class EjsAdapter implements TemplateAdapter {
if (this.config.inlineCssEnabled) {
try {
mail.data.html = inline(html, this.config.inlineCssOptions);
} catch (e) {}
} catch (e) {
callback(e);
}
} else {
mail.data.html = html;
}
Expand Down
4 changes: 3 additions & 1 deletion lib/adapters/handlebars.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ export class HandlebarsAdapter implements TemplateAdapter {
if (this.config.inlineCssEnabled) {
try {
mail.data.html = inline(rendered, this.config.inlineCssOptions);
} catch (e) {}
} catch (e) {
callback(e);
}
} else {
mail.data.html = rendered;
}
Expand Down
4 changes: 3 additions & 1 deletion lib/adapters/pug.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export class PugAdapter implements TemplateAdapter {
if (this.config.inlineCssEnabled) {
try {
mail.data.html = inline(body, this.config.inlineCssOptions);
} catch (e) {}
} catch (e) {
callback(e);
}
} else {
mail.data.html = body;
}
Expand Down

0 comments on commit 5d90fc8

Please sign in to comment.