You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have encountered a situation. I have been using Value.Equal() to compare old and new revision of data to determine whether to push out an update notification and observed all updates result in a push. Apparently Value.Equal() treats two NaNs as unequal to each other, which kind of makes sense, but is also kind of impractical. What is your opinion?
By the way, this behavior also affects Value.Diff(), which issues updates such as these despite the value being NaN in both old and new version:
{ type: 'update', path: '/85/ackTime', value: NaN },
And while Value.Diff() does not promise that the changes it will produce are minimal, this is at least unexpected and possibly should be clearly documented.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have encountered a situation. I have been using
Value.Equal()
to compare old and new revision of data to determine whether to push out an update notification and observed all updates result in a push. ApparentlyValue.Equal()
treats twoNaN
s as unequal to each other, which kind of makes sense, but is also kind of impractical. What is your opinion?By the way, this behavior also affects
Value.Diff()
, which issues updates such as these despite the value beingNaN
in both old and new version:And while
Value.Diff()
does not promise that the changes it will produce are minimal, this is at least unexpected and possibly should be clearly documented.Funnily enough, in Node:
Beta Was this translation helpful? Give feedback.
All reactions