Skip to content

Commit fc68366

Browse files
Update core.ts
1 parent 03d14cc commit fc68366

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/core.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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
});
@@ -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

Comments
 (0)