We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6a4a24 commit ca7fafdCopy full SHA for ca7fafd
index.ts
@@ -72,16 +72,13 @@ export default function diff(
72
);
73
} else if (
74
objKey !== newObjKey &&
75
+ // treat NaN values as equivalent
76
+ !(Number.isNaN(objKey) && Number.isNaN(newObjKey)) &&
77
!(
- // treat NaN values as equivalent
- (
78
- Number.isNaN(objKey) &&
79
- Number.isNaN(newObjKey) &&
80
- areCompatibleObjects &&
81
- (isNaN(objKey)
82
- ? objKey + "" === newObjKey + ""
83
- : +objKey === +newObjKey)
84
- )
+ areCompatibleObjects &&
+ (isNaN(objKey)
+ ? objKey + "" === newObjKey + ""
+ : +objKey === +newObjKey)
85
)
86
) {
87
diffs.push({
0 commit comments