File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -350,8 +350,6 @@ class SSRContainer extends _SharedContainer implements ISSRContainer {
350350 openContainer ( ) {
351351 if ( this . tag == 'html' ) {
352352 this . write ( '<!DOCTYPE html>' ) ;
353- // -1 so we only emit inside body
354- this . $noScriptHere$ = - 1 ;
355353 }
356354
357355 const containerAttributes = this . renderOptions . containerAttributes || { } ;
@@ -383,7 +381,6 @@ class SSRContainer extends _SharedContainer implements ISSRContainer {
383381 return this . closeElement ( ) ;
384382 }
385383
386- // -1 so we only emit inside body
387384 private $noScriptHere$ : number = 0 ;
388385
389386 /** Renders opening tag for DOM element */
@@ -402,12 +399,12 @@ class SSRContainer extends _SharedContainer implements ISSRContainer {
402399 ! isQwikStyle &&
403400 this . qlInclude === QwikLoaderInclude . Inline
404401 ) {
405- if ( this . $noScriptHere$ === 0 && this . size > 30 * 1024 ) {
402+ if ( this . $noScriptHere$ === 0 && this . size > 30 * 1024 && elementName !== 'body' ) {
406403 // We waited long enough, on slow connections the page is already partially visible
407404 this . emitQwikLoaderInline ( ) ;
408405 }
409406 // keep track of noscript and template, and for html we only emit inside body
410- else if ( elementName === 'noscript' || elementName === 'template' || elementName === 'body' ) {
407+ else if ( elementName === 'noscript' || elementName === 'template' ) {
411408 this . $noScriptHere$ ++ ;
412409 }
413410 }
You can’t perform that action at this time.
0 commit comments