fbjs icon indicating copy to clipboard operation
fbjs copied to clipboard

shallowEqual() should handle NaN values correctly

Open rickbeerendonk opened this issue 10 years ago • 1 comments

shallowEqual() should return true when dealing with NaN.

shallowEqual(NaN, NaN);  // true
shallowEqual({a: NaN}, {a: NaN});  // true

Fixing this would also fix the confusing error in React, see React Issue 5773.

rickbeerendonk avatar Jan 09 '16 18:01 rickbeerendonk

As mentioned, will be syncing this out from internal at some point, but yes, we will be doing this.

zpao avatar Jan 11 '16 18:01 zpao