jquery core: closes #3154. makeArray uses typeof instead of attribute sniffing for strings.

This commit is contained in:
Ariel Flesler 2008-08-13 18:16:14 +00:00
parent 5dc7bb7233
commit ec146fc73d

View File

@ -1133,7 +1133,7 @@ jQuery.extend({
if( array != null ){
var i = array.length;
// The window, strings (and functions) also have 'length'
if( i == null || array.split || array.setInterval )
if( i == null || typeof array == 'function' || array.setInterval )
ret[0] = array;
else
while( i )