Skip to content

Commit

Permalink
jquery core: makeArray was parsing forms into array of elements.
Browse files Browse the repository at this point in the history
  • 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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a584f82

Please sign in to comment.