mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Switch to Array.isArray from Utils.isArray.
This commit is contained in:
parent
dc99f60010
commit
b6e2f7c7f7
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user