Add strict equal fast path for object comparisons in equalObjects.

This commit is contained in:
John-David Dalton
2015-09-11 18:03:20 -07:00
parent 875dfec570
commit a5213f1291

View File

@@ -3883,7 +3883,10 @@
: customizer(objValue, othValue, key, object, other, stackA, stackB);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(result === undefined ? equalFunc(objValue, othValue, customizer, bitmask, stackA, stackB) : result)) {
if (!(result === undefined
? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stackA, stackB))
: result
)) {
return false;
}
skipCtor || (skipCtor = key == 'constructor');