mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
jquery core: makeArray was parsing forms into array of elements.
This commit is contained in:
parent
69d9abff2c
commit
a584f82aef
10
src/core.js
10
src/core.js
@ -1109,14 +1109,14 @@ jQuery.extend({
|
|||||||
makeArray: function( array ) {
|
makeArray: function( array ) {
|
||||||
var ret = [];
|
var ret = [];
|
||||||
|
|
||||||
if( array != undefined ){
|
if( array != null ){
|
||||||
var i = array.length;
|
var i = array.length;
|
||||||
//the window, strings and functions also have 'length'
|
//the window, forms, strings and functions also have 'length'
|
||||||
if( i != null && !array.split && array != window && !array.call )
|
if( i == null || array.split || array.setInterval || array.call || array.elements )
|
||||||
|
ret[0] = array;
|
||||||
|
else
|
||||||
while( i )
|
while( i )
|
||||||
ret[--i] = array[i];
|
ret[--i] = array[i];
|
||||||
else
|
|
||||||
ret[0] = array;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user