Selaa lähdekoodia

moved test upper

Gildas 6 vuotta sitten
vanhempi
sitoutus
bfde8c57c8
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      lib/single-file/modules/css-matched-rules.js

+ 3 - 3
lib/single-file/modules/css-matched-rules.js

@@ -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);