Skip to content
Browse files

jquery core: makeArray was parsing forms into array of elements.

  • Loading branch information...
1 parent 69d9abf commit a584f82aef3c20e11adeecc8513920e3d2a2ae2f @flesler flesler committed May 6, 2008
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/core.js
View
10 src/core.js
@@ -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;

0 comments on commit a584f82

Please sign in to comment.
Something went wrong with that request. Please try again.