Skip to content

Commit

Permalink
Access the _wrapped property directly instead of calling value()
Browse files Browse the repository at this point in the history
…when unwrapping wrapped objects in `isEqual()`
  • Loading branch information
ryantenney committed Dec 3, 2010
1 parent e63f44f commit ebe0cc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@
// One is falsy and the other truthy.
if ((!a && b) || (a && !b)) return false;
// Unwrap any wrapped objects.
if (a._chain) a = a.value();
if (b._chain) b = b.value();
if (a._chain) a = a._wrapped;
if (b._chain) b = b._wrapped;
// One of them implements an isEqual()?
if (a.isEqual) return a.isEqual(b);
// Check dates' integer values.
Expand Down

0 comments on commit ebe0cc6

Please sign in to comment.