|
|
@@ -70,9 +70,13 @@ this.RulesMatcher = this.RulesMatcher || (() => {
|
|
|
getMatchedElementsRules(doc, cssRule.cssRules, ruleMediaInfo, sheetIndex, matchedElementsCache, unmatchedSelectorsCache);
|
|
|
} else if (cssRule.type == CSSRule.STYLE_RULE) {
|
|
|
if (cssRule.selectorText) {
|
|
|
- let selectors = cssWhat.parse(cssRule.selectorText);
|
|
|
- const selectorsText = selectors.map(selector => cssWhat.stringify([selector]));
|
|
|
- selectors.forEach((selector, selectorIndex) => getMatchedElementsSelector(doc, cssRule, selector, selectorsText[selectorIndex], selectorsText, mediaInfo, ruleIndex, sheetIndex, matchedElementsCache, unmatchedSelectorsCache));
|
|
|
+ try {
|
|
|
+ let selectors = cssWhat.parse(cssRule.selectorText);
|
|
|
+ const selectorsText = selectors.map(selector => cssWhat.stringify([selector]));
|
|
|
+ selectors.forEach((selector, selectorIndex) => getMatchedElementsSelector(doc, cssRule, selector, selectorsText[selectorIndex], selectorsText, mediaInfo, ruleIndex, sheetIndex, matchedElementsCache, unmatchedSelectorsCache));
|
|
|
+ } catch (error) {
|
|
|
+ /* ignored */
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|