Browse Source

removed FIXME

Gildas 7 years ago
parent
commit
f1e0bb48cc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lib/single-file/rules-matcher.js

+ 3 - 3
lib/single-file/rules-matcher.js

@@ -129,15 +129,15 @@ this.RulesMatcher = this.RulesMatcher || (() => {
 				}
 				if (!ruleInfo) {
 					ruleInfo = { style: new Map(), matchedSelectors: new Set(), selectorsText: elementStyleInfo.selectorsText };
+				}
+				if (ruleInfo) {
 					if (elementStyleInfo.cssRule) {
 						ascendantMedia.rules.set(elementStyleInfo.cssRule, ruleInfo);
 					} else if (mediaInfo == allMediaInfo) {
 						allMediaInfo.styles.set(elementStyleInfo.cssStyle, ruleInfo);
 					}
-				}
-				if (ruleInfo) {
 					if (elementStyleInfo.selectorText) {
-						ruleInfo.matchedSelectors.add(elementStyleInfo.selectorText); // FIXME
+						ruleInfo.matchedSelectors.add(elementStyleInfo.selectorText);
 					}
 					const styleValue = ruleInfo.style.get(styleName);
 					if (!styleValue) {