single-file-core 1.2.15 → 1.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/core/index.js +5 -1
  2. package/package.json +1 -1
package/core/index.js CHANGED
@@ -588,7 +588,11 @@ class Processor {
588
588
  }
589
589
 
590
590
  preProcessPage() {
591
- this.doc.body.querySelectorAll(":not(svg) title, meta, link[href][rel*=\"icon\"]").forEach(element => ((element instanceof (this.options.win && this.options.win.HTMLElement)) || (element instanceof globalThis.HTMLElement)) && this.doc.head.appendChild(element));
591
+ this.doc.body.querySelectorAll(":not(svg) title, meta, link[href][rel*=\"icon\"]").forEach(element => {
592
+ if ((this.options.win && element instanceof this.options.win.HTMLElement) || element instanceof globalThis.HTMLElement) {
593
+ this.doc.head.appendChild(element);
594
+ }
595
+ });
592
596
  if (this.options.images && !this.options.saveRawPage) {
593
597
  this.doc.querySelectorAll("img[" + util.IMAGE_ATTRIBUTE_NAME + "]").forEach(imgElement => {
594
598
  const attributeValue = imgElement.getAttribute(util.IMAGE_ATTRIBUTE_NAME);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",