X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=c685b4efdeb6250242057b0d96a57edffb9f2936;hb=ea44348fdb8d039dd74684cdafc6c73430f297b3;hp=66efc182ccfb8458d7ad417aa21c379575db7e3f;hpb=25f9974cee5874d10df32f2d16fb985181e0c077;p=jquery.git diff --git a/src/core.js b/src/core.js index 66efc18..c685b4e 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 != null && !array.split && array != window && !array.call ) + while( i ) ret[--i] = array[i]; else ret[0] = array; + } return ret; },