Skip to content
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

Adjust dataIdFromObject logic to handle ID's with a value of 0 #3711

Merged
merged 2 commits into from
Jul 20, 2018

Conversation

hwillson
Copy link
Member

If a custom dataIdFromObject function returns a numeric ID with the value 0, it's seen as being a falsy value. This then prevents the query result associated with the ID from being written to the store. These changes adjust the falsy check to accommodate 0 based custom ID's.

Fixes #2164.

If a custom `dataIdFromObject` function returns a numeric ID
with the value 0, it's seen as being a falsy value. This then
prevents the query result associated with the ID from being
written to the store. These changes adjust the falsy check to
accommodate 0 based custom ID's.

Fixes #2164.
@hwillson hwillson merged commit e0ba906 into master Jul 20, 2018
@hwillson hwillson deleted the issue-2164 branch July 20, 2018 10:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant