single-file-core 1.5.31 → 1.5.33

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 +10 -2
  2. package/package.json +1 -1
package/core/index.js CHANGED
@@ -909,7 +909,11 @@ class Processor {
909
909
  }
910
910
  originalElement.childNodes.forEach(childNode => placeHolderElement.appendChild(childNode.cloneNode(true)));
911
911
  }
912
- templateElement.replaceWith(placeHolderElement);
912
+ try {
913
+ templateElement.replaceWith(placeHolderElement);
914
+ } catch (error) {
915
+ // ignored
916
+ }
913
917
  }
914
918
  });
915
919
  }
@@ -1252,7 +1256,11 @@ class Processor {
1252
1256
  }
1253
1257
  Array.from(frameElement.childNodes).forEach(node => node.remove());
1254
1258
  if (src && !testIgnoredPath(src)) {
1255
- url = util.resolveURL(src, this.baseURI);
1259
+ try {
1260
+ url = util.resolveURL(src, this.baseURI);
1261
+ } catch (error) {
1262
+ // ignored
1263
+ }
1256
1264
  if (this.options.saveOriginalURLs && src && !isDataURL(src)) {
1257
1265
  frameElement.setAttribute("data-sf-original-src", url);
1258
1266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.5.31",
3
+ "version": "1.5.33",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",