Make _.isEqual work with arguments objects in older versions of Opera.

Former-commit-id: 860a27e7f81e14781eb371cadf24bb812eb31718
This commit is contained in:
John-David Dalton
2012-12-03 01:54:46 -08:00
parent 9bccc9c53c
commit 12b0186f5a
5 changed files with 3873 additions and 128 deletions

View File

@@ -1326,8 +1326,9 @@
if (className != objectClass || (noNodeClass && (isNode(a) || isNode(b)))) {
return false;
}
var ctorA = a.constructor,
ctorB = b.constructor;
// in older versions of Opera, `arguments` objects have `Array` constructors
var ctorA = noArgsClass && isArguments(a) ? Object : a.constructor,
ctorB = noArgsClass && isArguments(b) ? Object : b.constructor;
// non `Object` object instances with different constructors are not equal
if (ctorA != ctorB && !(