X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=500e400d9f0295ce6f2a3c55def9d0d5e61ab7de;hb=96ca83d1501a2ffa78332c35d4a7afefe600f1ee;hp=fbf9f99562db70162e7aa9db0b14e14c35cc06b8;hpb=69d9abff2cc051ba9b7bd62dc4ddaa55f9a8cd6d;p=jquery.git diff --git a/src/core.js b/src/core.js index fbf9f99..500e400 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 ) + if( i == null || array.split || array.setInterval || array.call ) + ret[0] = array; + else while( i ) ret[--i] = array[i]; - else - ret[0] = array; } return ret;