mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 19:37:49 +00:00
safer but slower toArray fallback, in light of .callee throwing in strict mode.
This commit is contained in:
@@ -590,7 +590,7 @@
|
|||||||
// Is a given value an array?
|
// Is a given value an array?
|
||||||
// Delegates to ECMA5's native Array.isArray
|
// Delegates to ECMA5's native Array.isArray
|
||||||
_.isArray = nativeIsArray || function(obj) {
|
_.isArray = nativeIsArray || function(obj) {
|
||||||
return !!(obj && obj.concat && obj.unshift && !obj.callee);
|
return toString.call(obj) === '[object Array]';
|
||||||
};
|
};
|
||||||
|
|
||||||
// Is a given variable an arguments object?
|
// Is a given variable an arguments object?
|
||||||
|
|||||||
Reference in New Issue
Block a user