mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 19:37:49 +00:00
Add support for comparing symbol properties to _.isEqual. [closes #2840]
This commit is contained in:
20
lodash.js
20
lodash.js
@@ -3304,16 +3304,16 @@
|
||||
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
||||
var objIsArr = isArray(object),
|
||||
othIsArr = isArray(other),
|
||||
objTag = arrayTag,
|
||||
othTag = arrayTag;
|
||||
objTag = objIsArr ? arrayTag : getTag(object),
|
||||
othTag = othIsArr ? arrayTag : getTag(other);
|
||||
|
||||
if (!objIsArr) {
|
||||
objTag = getTag(object);
|
||||
objTag = objTag == argsTag ? objectTag : objTag;
|
||||
if (objTag == argsTag) {
|
||||
objTag = objectTag;
|
||||
object = copyObject(object, keys(object));
|
||||
}
|
||||
if (!othIsArr) {
|
||||
othTag = getTag(other);
|
||||
othTag = othTag == argsTag ? objectTag : othTag;
|
||||
if (othTag == argsTag) {
|
||||
othTag = objectTag;
|
||||
other = copyObject(other, keys(other));
|
||||
}
|
||||
var objIsObj = objTag == objectTag,
|
||||
othIsObj = othTag == objectTag,
|
||||
@@ -5816,9 +5816,9 @@
|
||||
*/
|
||||
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
||||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
||||
objProps = keys(object),
|
||||
objProps = getAllKeys(object),
|
||||
objLength = objProps.length,
|
||||
othProps = keys(other),
|
||||
othProps = getAllKeys(other),
|
||||
othLength = othProps.length;
|
||||
|
||||
if (objLength != othLength && !isPartial) {
|
||||
|
||||
Reference in New Issue
Block a user