Switch to Array.isArray from Utils.isArray.

This commit is contained in:
Edward Lee 2010-07-26 11:02:52 -07:00
parent dc99f60010
commit b6e2f7c7f7

View File

@ -649,13 +649,6 @@ var Utils = {
return (typeof(n) == 'number' && !isNaN(n));
},
// ----------
// Function: isArray
// Returns true if the given object is an array.
isArray: function( obj ) {
return toString.call(obj) === "[object Array]";
},
// ----------
// Function: isRect
// Returns true if the given object (r) looks like a <Rect>.
@ -725,7 +718,7 @@ var Utils = {
// has properties that are themselves objects, those properties will be copied by reference.
copy: function(value) {
if (value && typeof(value) == 'object') {
if (this.isArray(value))
if (Array.isArray(value))
return this.extend([], value);
return this.extend({}, value);
}