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(recommend): prevent undefined
threshold
#1300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test with a value for threshold
?
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3007cb4:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
What sets the threshold to undefined instead of nothing? |
Not sure if that's what you asked, but defaulted props in the recommend UI library for example, or if you send |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decent solution, what we probably were more looking for here is lodash.defaults instead of Object.assign, but it's not that big of a deal
Summary
Sending
threshold: undefined
to the API client causes the default value (0
) to be overridden.sandbox reproduction
Result
The default value isn't overridden when sending
threshold: undefined