Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
jquery core: makeArray was parsing forms into array of elements.
  • Loading branch information
flesler committed May 6, 2008
1 parent 69d9abf commit a584f82
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core.js
Expand Up @@ -1109,14 +1109,14 @@ jQuery.extend({
makeArray: function( array ) {
var ret = [];

if( array != undefined ){
if( array != null ){
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];
else
ret[0] = array;
}

return ret;
Expand Down

0 comments on commit a584f82

Please sign in to comment.