Skip to content

Commit

Permalink
code review re. #1772: fixed previewing of :has() filters
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Oct 1, 2016
1 parent 889bf17 commit 6557024
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/js/scriptlets/element-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6557024

Please sign in to comment.