From 4531ab13243f5e94e1ecfbd55e992842666d08aa Mon Sep 17 00:00:00 2001 From: John Resig Date: Tue, 4 Jul 2006 04:37:09 +0000 Subject: [PATCH] Fixed a bug with $.map() and undefined values. --- jquery/jquery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); } -- 1.7.10.4