From a5213f12916ab33dbcfc770b1d58e2592eace68e Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 11 Sep 2015 18:03:20 -0700 Subject: [PATCH] Add strict equal fast path for object comparisons in `equalObjects`. --- lodash.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 87296ce38..e04406f39 100644 --- a/lodash.js +++ b/lodash.js @@ -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');