mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Ensure _.isEqual works with objects created by Object.create(null).
This commit is contained in:
@@ -1277,10 +1277,10 @@
|
||||
ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor;
|
||||
|
||||
// non `Object` object instances with different constructors are not equal
|
||||
if (ctorA != ctorB && !(
|
||||
isFunction(ctorA) && ctorA instanceof ctorA &&
|
||||
isFunction(ctorB) && ctorB instanceof ctorB
|
||||
)) {
|
||||
if (ctorA != ctorB &&
|
||||
!(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
|
||||
(!nativeCreate || ('constructor' in a && 'constructor' in b))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user