-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Equality check for non-primitives in clearOnDefault #504
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
any update here ? |
35674d2
to
66e8150
Compare
hey @franky47 is there any update on this ? |
@Kavan72 sorry I'm on holiday with sick wife and kids, kind of hard to free up time to work on this at the moment, hopefully I can merge this next week. |
@franky47 Great, take your time and have good weekends 😊 |
66e8150
to
7e8c6a5
Compare
7e8c6a5
to
c829222
Compare
🎉 This PR is included in version 1.17.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@franky47 I think one edge case is still missing here. Suppose my URL looks like this:
and I'm changing this status with multiple checkboxes. Users can select any checkbox without any specific order. For example, if a user selects 'CONFIRMED' first, then 'PENDING', the URL would look like this:
In this case, the state remains the same but clearOnDefault will not be triggered due to checking the data with index using the
here
and this condition is not met because of |
For this, I'd say you could write your own version of In some cases, the order matters, in some other it doesn't. |
Okay perfect 👍 |
As reported by @Kavan72 in #462 (comment)
Testing only for referential equality is not enough for types like arrays and objects.
This introduces a new property of the parsers to specify an equality function to use when comparing against the default value.
eq
property.