git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0027439
)
Fixed a bug with $.map() and undefined values.
author
John Resig
<jeresig@gmail.com>
Tue, 4 Jul 2006 04:37:09 +0000
(
04:37
+0000)
committer
John Resig
<jeresig@gmail.com>
Tue, 4 Jul 2006 04:37:09 +0000
(
04:37
+0000)
jquery/jquery.js
patch
|
blob
|
history
diff --git
a/jquery/jquery.js
b/jquery/jquery.js
index
419b6e1
..
2874e52
100644
(file)
--- 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 );
}