safer but slower toArray fallback, in light of .callee throwing in strict mode.

This commit is contained in:
Jeremy Ashkenas
2010-12-20 17:39:57 -05:00
parent a890afec18
commit b3a373a716

View File

@@ -590,7 +590,7 @@
// Is a given value an array?
// Delegates to ECMA5's native Array.isArray
_.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?