mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
_.isEqual: Use a strict comparison to avoid an unnecessary division for false values.
This commit is contained in:
@@ -596,7 +596,7 @@
|
||||
// Internal recursive comparison function.
|
||||
function eq(a, b, stack) {
|
||||
// Identical objects are equal.
|
||||
if (a === b) return a != 0 || 1 / a == 1 / b;
|
||||
if (a === b) return a !== 0 || 1 / a == 1 / b;
|
||||
// A strict comparison is necessary because `null == undefined`.
|
||||
if (a == null) return a === b;
|
||||
// Compare object types.
|
||||
|
||||
Reference in New Issue
Block a user