File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 251251 rb-fsevent (0.11.2 )
252252 rb-inotify (0.10.1 )
253253 ffi (~> 1.0 )
254- rexml (3.3.6 )
255- strscan
254+ rexml (3.3.9 )
256255 rouge (3.30.0 )
257256 rubyzip (2.3.2 )
258257 safe_yaml (1.0.5 )
266265 faraday (>= 0.17.3 , < 3 )
267266 simpleidn (0.2.1 )
268267 unf (~> 0.1.4 )
269- strscan (3.1.0 )
270268 terminal-table (1.8.0 )
271269 unicode-display_width (~> 1.1 , >= 1.1.1 )
272270 typhoeus (1.4.1 )
Original file line number Diff line number Diff line change @@ -185,8 +185,18 @@ const ComposeEmailStep = ({
185185 const fileReader = new FileReader ( ) ;
186186 fileReader . onload = e => {
187187 const mjmlContent = e . target . result . toString ( ) ;
188- const { html } = mjml2html ( mjmlContent ) ;
189- onEmailContentsChange ( html ) ;
188+ try {
189+ 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+ }
190200 } ;
191201
192202 const file = event . target . files [ 0 ] ;
You can’t perform that action at this time.
0 commit comments