From a584f82aef3c20e11adeecc8513920e3d2a2ae2f Mon Sep 17 00:00:00 2001 From: Ariel Flesler Date: Tue, 6 May 2008 23:28:21 +0000 Subject: [PATCH] jquery core: makeArray was parsing forms into array of elements. --- src/core.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core.js b/src/core.js index fbf9f9956..9752fb162 100644 --- a/src/core.js +++ b/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;