single-file-core 1.0.71 → 1.0.72
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.
- package/package.json +1 -1
- package/single-file-core.js +2 -2
package/package.json
CHANGED
package/single-file-core.js
CHANGED
|
@@ -626,7 +626,7 @@ class Processor {
|
|
|
626
626
|
}
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
|
-
if (this.options.adoptedStyleSheets.length) {
|
|
629
|
+
if (this.options.adoptedStyleSheets && this.options.adoptedStyleSheets.length) {
|
|
630
630
|
const styleElement = this.doc.createElement("style");
|
|
631
631
|
styleElement.textContent = this.options.adoptedStyleSheets.join("\n");
|
|
632
632
|
this.doc.body.appendChild(styleElement);
|
|
@@ -1194,7 +1194,7 @@ class Processor {
|
|
|
1194
1194
|
if (shadowRootData) {
|
|
1195
1195
|
const templateElement = doc.createElement("template");
|
|
1196
1196
|
templateElement.setAttribute(SHADOWROOT_ATTRIBUTE_NAME, shadowRootData.mode);
|
|
1197
|
-
if (shadowRootData.adoptedStyleSheets) {
|
|
1197
|
+
if (shadowRootData.adoptedStyleSheets && shadowRootData.adoptedStyleSheets.length) {
|
|
1198
1198
|
shadowRootData.adoptedStyleSheets.forEach(stylesheetContent => {
|
|
1199
1199
|
const styleElement = doc.createElement("style");
|
|
1200
1200
|
styleElement.textContent = stylesheetContent;
|