Use the native isArray whenever possible. See perf test by jdalton here: http://jsperf.com/isarray-vs-other Fixes #6825.

This commit is contained in:
John Resig 2010-08-27 13:15:48 -04:00
parent 7f18d29287
commit ea8b1584b1

View file

@ -441,7 +441,7 @@ jQuery.extend({
return jQuery.type(obj) === "function"; return jQuery.type(obj) === "function";
}, },
isArray: function( obj ) { isArray: Array.isArray || function( obj ) {
return jQuery.type(obj) === "array"; return jQuery.type(obj) === "array";
}, },