mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 03:47:50 +00:00
_.isEqual: Fix an erroneous check for the constructor property.
This commit is contained in:
@@ -726,7 +726,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Objects with different constructors are not equivalent.
|
// Objects with different constructors are not equivalent.
|
||||||
if ("constructor" in a == "constructor" in b && a.constructor != b.constructor) return false;
|
if ("constructor" in a != "constructor" in b || a.constructor != b.constructor) return false;
|
||||||
// Deep compare objects.
|
// Deep compare objects.
|
||||||
for (var key in a) {
|
for (var key in a) {
|
||||||
if (hasOwnProperty.call(a, key)) {
|
if (hasOwnProperty.call(a, key)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user