From ec976953cdd355a5709bfbbd2ceb4d242b68a60c Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 2 Sep 2012 12:04:35 -0700 Subject: [PATCH] Simplify wrapper inference in `_.isEqual`. Former-commit-id: b4fda683ebee4c3f7dddd0cb87201306c08fa7d5 --- lodash.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lodash.js b/lodash.js index f42e4234f..e03d76066 100644 --- a/lodash.js +++ b/lodash.js @@ -1452,12 +1452,9 @@ } if (objectTypes[typeof a] || objectTypes[typeof b] || thorough.value) { // unwrap any LoDash wrapped values - if (a._chain) { - a = a._wrapped; - } - if (b._chain) { - b = b._wrapped; - } + a = a._wrapped || a; + b = b._wrapped || b; + // use custom `isEqual` method if available if (a.isEqual && isFunction(a.isEqual)) { thorough.value = null;