1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 10:09:38 +02:00

code review re. #1772: fixed previewing of :has() filters

This commit is contained in:
gorhill 2016-10-01 13:34:20 -04:00
parent 889bf17545
commit 6557024434

View File

@ -779,10 +779,11 @@ var filterToDOMInterface = (function() {
} catch(ex) {
return;
}
var out = [];
var out = [], elem;
for ( var i = 0, n = elems.length; i < n; i++ ) {
if ( document.querySelector(arg) ) {
out.push({ type: 'cosmetic', elem: elems[i] });
elem = elems[i];
if ( elem.querySelector(arg) ) {
out.push({ type: 'cosmetic', elem: elem });
}
}
return out;