-
-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mimic React Hook's dependencies comparison (#374)
closes #155 This PR changes the comparison behavior to mimic the React Hook dependencies comparison which uses Object.is(). Previously, keys are compared by the == operator. The Dart == operator works differently from the JavaScript Object.is(): Object.is() Object.is(NaN, NaN) // true Object.is(0, -0) // false Dart == double.nan == double.nan // false 0 == -0 // true This PR checks if a list of keys contain a value with the type num and proceeds to handle cases where the value is either NaN or 0.0 and -0.0.
- Loading branch information
Showing
3 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters