diff --git a/docs/source/playground-demo.gif b/docs/source/playground-demo.gif index 8fbbce3b0..19802b5bf 100644 Binary files a/docs/source/playground-demo.gif and b/docs/source/playground-demo.gif differ diff --git a/docs/themes/navy/source/js/main.js b/docs/themes/navy/source/js/main.js index 7be71a58a..278e90e49 100644 --- a/docs/themes/navy/source/js/main.js +++ b/docs/themes/navy/source/js/main.js @@ -52,6 +52,7 @@ const editors = [editor, dataEditor]; let previewValue = ''; + let hadPreview = false; colorScheme.addEventListener('change', function() { editors.forEach(applyEditorTheme); if (previewValue) setPreview(previewValue); @@ -176,7 +177,10 @@ history.replaceState({}, '', '#' + serializeArgs({tpl, data})); try { const html = await engine.parseAndRender(tpl, JSON.parse(data)); - setPreview(html); + if (html !== '' || !hadPreview) { + setPreview(html); + if (html !== '') hadPreview = true; + } } catch (err) { // keep last successful output while template or context is invalid }