Skip to content

Commit

Permalink
fix #2372 better error when malformed mjml
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Cavrois committed Jan 14, 2022
1 parent 0f4c641 commit f64a0d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/mjml-core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ export default function mjml2html(mjml, options = {}) {
globalDatas.headRaw = processing(mjHead, headHelpers)

content = processing(mjBody, bodyHelpers, applyAttributes)

if (!content) {
throw new Error('Malformed MJML. Check that your structure is correct and enclosed in <mjml> tags.')
}

content = minifyOutlookConditionnals(content)

Expand Down

0 comments on commit f64a0d0

Please sign in to comment.