mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Minor cleanup of baseIsEqual.
This commit is contained in:
@@ -1931,11 +1931,9 @@
|
|||||||
}
|
}
|
||||||
if (!valHasCtor) {
|
if (!valHasCtor) {
|
||||||
// non `Object` object instances with different constructors are not equal
|
// non `Object` object instances with different constructors are not equal
|
||||||
if (valCtor != othCtor &&
|
if (valCtor != othCtor && ('constructor' in value && 'constructor' in other) &&
|
||||||
!(typeof valCtor == 'function' && valCtor instanceof valCtor &&
|
!(typeof valCtor == 'function' && valCtor instanceof valCtor &&
|
||||||
typeof othCtor == 'function' && othCtor instanceof othCtor) &&
|
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
||||||
('constructor' in value && 'constructor' in other)
|
|
||||||
) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user