|
|
@@ -462,7 +462,11 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
});
|
|
|
const metaElement = this.doc.createElement("meta");
|
|
|
metaElement.setAttribute("charset", "utf-8");
|
|
|
- this.doc.head.insertBefore(metaElement, this.doc.head.firstElementChild);
|
|
|
+ if (this.doc.head.firstChild) {
|
|
|
+ this.doc.head.insertBefore(metaElement, this.doc.head.firstChild);
|
|
|
+ } else {
|
|
|
+ this.doc.head.appendChild(metaElement);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
insertFaviconLink() {
|