Commit 440c08d7 authored by Ariel Flesler's avatar Ariel Flesler

jquery core: Applied #1318 to jQuery.grep

parent 1762dc24
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment