Fixed issue with typeof check - "array" isn't a valid type.

This commit is contained in:
John Resig 2008-02-17 15:05:55 +00:00
parent f43516f209
commit a19a123d89

View File

@ -1121,7 +1121,7 @@ jQuery.extend({
var ret = []; var ret = [];
// Need to use typeof to fight Safari childNodes crashes // Need to use typeof to fight Safari childNodes crashes
if ( typeof array != "array" ) if ( array.constructor != Array )
for ( var i = 0, length = array.length; i < length; i++ ) for ( var i = 0, length = array.length; i < length; i++ )
ret.push( array[ i ] ); ret.push( array[ i ] );
else else