git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test runner: extra test for makeArray, related to [5481]
[jquery.git]
/
src
/
core.js
diff --git
a/src/core.js
b/src/core.js
index
fbf9f99
..
500e400
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-1109,14
+1109,14
@@
jQuery.extend({
makeArray: function( array ) {
var ret = [];
makeArray: function( array ) {
var ret = [];
- if( array != undefined ){
+ if( array != null ){
var i = array.length;
//the window, strings and functions also have 'length'
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];
while( i )
ret[--i] = array[i];
- else
- ret[0] = array;
}
return ret;
}
return ret;