Browse Source

fixed item finding issue

Gildas 7 năm trước cách đây
mục cha
commit
6060b719f6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 = [];
 			} else {
 				matchedElements = doc.querySelectorAll(selectorText);
-				if (!matchedElements.length && !unmatchedSelectorsCache.find(selectorText)) {
+				if (!matchedElements.length && !unmatchedSelectorsCache.includes(selectorText)) {
 					unmatchedSelectorsCache.push(selectorText);
 				}
 			}