|
|
@@ -39,9 +39,9 @@ this.matchedRules = this.matchedRules || (() => {
|
|
|
const workStyleElement = doc.createElement("style");
|
|
|
doc.body.appendChild(workStyleElement);
|
|
|
stylesheets.forEach(stylesheetInfo => {
|
|
|
- const cssRules = stylesheetInfo.stylesheet.children;
|
|
|
- if (cssRules) {
|
|
|
- if (!stylesheetInfo.scoped) {
|
|
|
+ if (!stylesheetInfo.scoped) {
|
|
|
+ const cssRules = stylesheetInfo.stylesheet.children;
|
|
|
+ if (cssRules) {
|
|
|
if (stylesheetInfo.mediaText && stylesheetInfo.mediaText != MEDIA_ALL) {
|
|
|
const mediaInfo = createMediaInfo(stylesheetInfo.mediaText);
|
|
|
this.mediaAllInfo.medias.set("style-" + sheetIndex + "-" + stylesheetInfo.mediaText, mediaInfo);
|