Fixed a bug with $.map() and undefined values.
This commit is contained in:
parent
0027439156
commit
4531ab1324
2
jquery/jquery.js
vendored
2
jquery/jquery.js
vendored
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue