Browse Source

removed redundant test

Gildas 7 years ago
parent
commit
8cad93af92
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/single-file/css-matched-rules.js

+ 1 - 1
lib/single-file/css-matched-rules.js

@@ -101,7 +101,7 @@ this.matchedRules = this.matchedRules || (() => {
 					mediaInfo.medias.set("rule-" + sheetIndex + "-" + mediaIndex + "-" + mediaText, ruleMediaInfo);
 					mediaIndex++;
 					getMatchedElementsRules(doc, cssRule.block.children, ruleMediaInfo, sheetIndex, docStyle, matchedElementsCache, stylesheet);
-				} else if (cssRule.type == "Rule" && cssRule.prelude.children) {
+				} else if (cssRule.type == "Rule") {
 					const selectors = cssRule.prelude.children.toArray();
 					const selectorsText = cssRule.prelude.children.toArray().map(selector => cssTree.generate(selector));
 					const ruleInfo = { cssRule, mediaInfo, ruleIndex, sheetIndex, matchedSelectors: new Set(), declarations: new Set(), selectors, selectorsText };