We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 82c315a + 10f478a commit b0e722cCopy full SHA for b0e722c
web-ui/src/pages/EmailPage.jsx
@@ -185,8 +185,18 @@ const ComposeEmailStep = ({
185
const fileReader = new FileReader();
186
fileReader.onload = e => {
187
const mjmlContent = e.target.result.toString();
188
- const { html } = mjml2html(mjmlContent);
189
- onEmailContentsChange(html);
+ try {
+ const result = mjml2html(mjmlContent);
190
+ onEmailContentsChange(result.html);
191
+ } catch(e) {
192
+ window.snackDispatch({
193
+ type: UPDATE_TOAST,
194
+ payload: {
195
+ severity: 'error',
196
+ toast: e.message,
197
+ }
198
+ });
199
200
};
201
202
const file = event.target.files[0];
0 commit comments