mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 16:24:57 -05:00
Traversing: .not/.filter consistency with non-elements
Fixes gh-2808 Close gh-2809
This commit is contained in:
committed by
Timmy Willison
parent
b0b280cd61
commit
0e2f8f9eff
@@ -33,7 +33,7 @@ function winnow( elements, qualifier, not ) {
|
||||
}
|
||||
|
||||
return jQuery.grep( elements, function( elem ) {
|
||||
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
||||
return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user