mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
jquery core: Applied #1318 to jQuery.grep
This commit is contained in:
parent
1762dc24d6
commit
440c08d768
@ -1177,7 +1177,7 @@ jQuery.extend({
|
||||
// Go through the array, only saving the items
|
||||
// that pass the validator function
|
||||
for ( var i = 0, length = elems.length; i < length; i++ )
|
||||
if ( !inv && callback( elems[ i ], i ) || inv && !callback( elems[ i ], i ) )
|
||||
if ( !inv != !callback( elems[ i ], i ) )
|
||||
ret.push( elems[ i ] );
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user