diff --git a/js/import/import.ui.js b/js/import/import.ui.js index 3f0275df..565b201a 100644 --- a/js/import/import.ui.js +++ b/js/import/import.ui.js @@ -73,98 +73,111 @@ const setupUI = () => { }; const loadResult = ({ md, html: outputHTML }) => { - ui.transformedEditor.setValue(html_beautify(outputHTML.replaceAll(/\s+/g, ' '), { - indent_size: '2', - })); - ui.markdownEditor.setValue(md || ''); + if (outputHTML) { + ui.transformedEditor.setValue(html_beautify(outputHTML.replaceAll(/\s+/g, ' '), { + indent_size: '2', + })); + } - const mdPreview = WebImporter.md2html(md); - // XSS review: we need interpreted HTML here -