X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=c5fb865ed4645c3084092e4b2bf5b5c05e9d8e9d;hb=77bb2c505f1d2c4437f4b52866408f8bd1a5020f;hp=66efc182ccfb8458d7ad417aa21c379575db7e3f;hpb=25f9974cee5874d10df32f2d16fb985181e0c077;p=jquery.git diff --git a/src/core.js b/src/core.js index 66efc18..c5fb865 100644 --- a/src/core.js +++ b/src/core.js @@ -1114,13 +1114,15 @@ jQuery.extend({ makeArray: function( array ) { var ret = []; - if( array != undefined ) - //strings and functions also have 'length' - if( array.length != undefined && !array.split && !array.call ) - for( var i = array.length; i; ) + if( array != undefined ){ + var i = array.length; + //the window, strings and functions also have 'length' + if( i != undefined && typeof array == 'object' && array != window ) + while( i ) ret[--i] = array[i]; else ret[0] = array; + } return ret; },