From: Ariel Flesler Date: Mon, 12 May 2008 01:21:50 +0000 (+0000) Subject: jquery core: Applied #1318 to jQuery.grep X-Git-Tag: 1.2.4b~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=440c08d768180cc668d0b2d77a9dfb14436555a5;p=jquery.git jquery core: Applied #1318 to jQuery.grep --- diff --git a/src/core.js b/src/core.js index b9a2fed49..a86ef8dfb 100644 --- a/src/core.js +++ b/src/core.js @@ -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;