From: John Resig Date: Tue, 4 Jul 2006 04:37:09 +0000 (+0000) Subject: Fixed a bug with $.map() and undefined values. X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;h=4531ab13243f5e94e1ecfbd55e992842666d08aa;p=jquery.git Fixed a bug with $.map() and undefined values. --- diff --git a/jquery/jquery.js b/jquery/jquery.js index 419b6e1..2874e52 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -751,7 +751,7 @@ jQuery.map = function(a,f) { var r = []; for ( var i = 0; i < a.length; i++ ) { var t = f(a[i],i); - if ( t !== null ) { + if ( t !== null && t != undefined ) { if ( t.constructor != Array ) t = [t]; r = jQuery.merge( t, r ); }