mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Fix isEqual tests on older Safari.
This commit is contained in:
@@ -2285,9 +2285,7 @@
|
|||||||
if (value === other) {
|
if (value === other) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Exit early for unlike primitive values.
|
if (value == null || other == null || (!isObject(value) && !isObject(other))) {
|
||||||
if ((typeof value != 'object' && typeof other != 'object') || value == null || other == null) {
|
|
||||||
// Return `false` unless both values are `NaN`.
|
|
||||||
return value !== value && other !== other;
|
return value !== value && other !== other;
|
||||||
}
|
}
|
||||||
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
|
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
|
||||||
@@ -8771,18 +8769,7 @@
|
|||||||
function isEqual(value, other, customizer, thisArg) {
|
function isEqual(value, other, customizer, thisArg) {
|
||||||
customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
|
customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
|
||||||
var result = customizer ? customizer(value, other) : undefined;
|
var result = customizer ? customizer(value, other) : undefined;
|
||||||
if (result !== undefined) {
|
return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
|
||||||
return !!result;
|
|
||||||
}
|
|
||||||
if (value === other) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// Exit early for unlike primitive values.
|
|
||||||
if ((typeof value != 'object' && typeof other != 'object') || value == null || other == null) {
|
|
||||||
// Return `false` unless both values are `NaN`.
|
|
||||||
return value !== value && other !== other;
|
|
||||||
}
|
|
||||||
return baseIsEqual(value, other, customizer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user