fix(preview): stop loader re-appearing when rendered.js is missing
When rendered is null, render() was setting loading.style.display='flex' before returning — overriding the hide already done in the init error branch. Now render() silently returns, leaving init to handle the error. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc2d9de2a4
commit
dc602a7dde
1 file changed
+1
-1
+1
-1
@@ -183,7 +183,7 @@ function transform(html, mode) {
|
|||||||
function render() {
|
function render() {
|
||||||
const frame = document.getElementById('preview-frame');
|
const frame = document.getElementById('preview-frame');
|
||||||
const loading = document.getElementById('loading');
|
const loading = document.getElementById('loading');
|
||||||
if(!rendered) { loading.style.display='flex'; frame.style.display='none'; return; }
|
if(!rendered) return; // no data yet — init handles the error display
|
||||||
|
|
||||||
frame.style.display = 'none';
|
frame.style.display = 'none';
|
||||||
loading.style.display = 'flex';
|
loading.style.display = 'flex';
|
||||||
|
|||||||
Reference in new issue
Block a user