SparkPost / heml

HEML is an open source markup language for building responsive email.
https://heml.io
MIT License
4.33k stars 157 forks source link

catching error in optimistic code #38

Closed avigoldman closed 6 years ago

avigoldman commented 6 years ago

Right now if you have a CSS error in a rule that gets expanded (background, margin, etc.) it will fail and return undefined. This is a simple fix to drop out early if the expander returns a falsey value.

You can test this by using a color name that doesn't exist.

<heml>
  <head>
    <style>
      body {
        background: idontexist;
      }
    </style>
  </head>
  <body></body>
</heml>