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:
69d9abf
)
jquery core: makeArray was parsing forms into array of elements.
author
Ariel Flesler
<aflesler@gmail.com>
Tue, 6 May 2008 23:28:21 +0000
(23:28 +0000)
committer
Ariel Flesler
<aflesler@gmail.com>
Tue, 6 May 2008 23:28:21 +0000
(23:28 +0000)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
fbf9f99
..
9752fb1
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-1109,14
+1109,14
@@
jQuery.extend({
makeArray: function( array ) {
var ret = [];
makeArray: function( array ) {
var ret = [];
- if( array != undefined ){
+ if( array != null ){
var i = array.length;
var i = array.length;
- //the window, strings and functions also have 'length'
- if( i != null && !array.split && array != window && !array.call )
+ //the window, forms, strings and functions also have 'length'
+ if( i == null || array.split || array.setInterval || array.call || array.elements )
+ ret[0] = array;
+ else
while( i )
ret[--i] = array[i];
while( i )
ret[--i] = array[i];
- else
- ret[0] = array;
}
return ret;
}
return ret;