@@ -169,7 +169,7 @@ export class Core extends Module {
169169 if ( ! key . startsWith ( '$' ) ) {
170170 const container = document . querySelector ( this . getFragmentContainerSelector ( fragment , key ) ) ;
171171 if ( container ) {
172- this . setEvalInnerHtml ( container , res [ key ] ) ;
172+ this . setEvalInnerHtml ( container , res [ key ] , container . tagName === "meta" ) ;
173173 }
174174 }
175175 } ) ;
@@ -180,7 +180,7 @@ export class Core extends Module {
180180 }
181181
182182 private static getFragmentContainerSelector ( fragment : IPageFragmentConfig , partial : string ) {
183- return partial === "main" ? `[puzzle-fragment="${ fragment . name } "]` : `[puzzle-fragment="${ fragment . name } "][fragment-partial="${ partial } "]` ;
183+ return partial === "main" ? `[puzzle-fragment="${ fragment . name } "]:not([fragment-partial]) ` : `[puzzle-fragment="${ fragment . name } "][fragment-partial="${ partial } "]` ;
184184 }
185185
186186 private static prepareQueryString ( fragmentAttributes : Record < string , string > ) {
@@ -195,7 +195,12 @@ export class Core extends Module {
195195 return Object . keys ( attributes ) . reduce ( ( query : string , key : string ) => `${ query } &${ key } =${ attributes [ key ] } ` , '?__renderMode=stream' ) ;
196196 }
197197
198- private static setEvalInnerHtml ( elm : any , html : any ) {
198+ private static setEvalInnerHtml ( elm : any , html : any , meta ?: boolean ) {
199+ if ( meta ) {
200+ elm . outerHTML = html ;
201+ return ;
202+ }
203+
199204 elm . innerHTML = html ;
200205 Array . from ( elm . querySelectorAll ( "script" ) ) . forEach ( ( oldScript : any ) => {
201206 const newScript = document . createElement ( "script" ) ;
0 commit comments