Explorar el Código

fixed item finding issue

Gildas hace 7 años
padre
commit
6060b719f6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/single-file/css-rules-matcher.js

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

@@ -90,7 +90,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
 				matchedElements = [];
 				matchedElements = [];
 			} else {
 			} else {
 				matchedElements = doc.querySelectorAll(selectorText);
 				matchedElements = doc.querySelectorAll(selectorText);
-				if (!matchedElements.length && !unmatchedSelectorsCache.find(selectorText)) {
+				if (!matchedElements.length && !unmatchedSelectorsCache.includes(selectorText)) {
 					unmatchedSelectorsCache.push(selectorText);
 					unmatchedSelectorsCache.push(selectorText);
 				}
 				}
 			}
 			}