|
@@ -374,7 +374,9 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async finalize() {
|
|
async finalize() {
|
|
|
- this.workStyleElement.remove();
|
|
|
|
|
|
|
+ if (this.workStyleElement.parentNode) {
|
|
|
|
|
+ this.workStyleElement.remove();
|
|
|
|
|
+ }
|
|
|
const metaCharset = this.doc.head.querySelector("meta[charset]");
|
|
const metaCharset = this.doc.head.querySelector("meta[charset]");
|
|
|
if (metaCharset) {
|
|
if (metaCharset) {
|
|
|
this.doc.head.insertBefore(metaCharset, this.doc.head.firstChild);
|
|
this.doc.head.insertBefore(metaCharset, this.doc.head.firstChild);
|