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.
1 parent 2debb30 commit be5b09eCopy full SHA for be5b09e
packages/app/src/sandbox/compile.ts
@@ -550,15 +550,18 @@ async function compile({
550
: '<div id="root"></div>'
551
);
552
553
- document.body.innerHTML = body;
554
-
555
if (lastHeadHTML && lastHeadHTML !== head) {
556
document.location.reload();
557
}
558
if (manager && lastBodyHTML && lastBodyHTML !== body) {
559
manager.clearCompiledCache();
560
561
+ if (!firstLoad || process.env.LOCAL_SERVER) {
+ // The HTML is loaded from the server as a static file, no need to set the innerHTML of the body
562
+ // on the first run.
563
+ document.body.innerHTML = body;
564
+ }
565
lastBodyHTML = body;
566
lastHeadHTML = head;
567
0 commit comments