]> source.dussan.org Git - jquery.git/commitdiff
jquery core: Applied #1318 to jQuery.grep
authorAriel Flesler <aflesler@gmail.com>
Mon, 12 May 2008 01:21:50 +0000 (01:21 +0000)
committerAriel Flesler <aflesler@gmail.com>
Mon, 12 May 2008 01:21:50 +0000 (01:21 +0000)
src/core.js

index b9a2fed49f4598a305b8f659f947e71be9590053..a86ef8dfbf23624233a8aa0bc91c9f137784103d 100644 (file)
@@ -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;