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

Fix null value for string array field crashes dataProvider in ra-data-graphql-simple #4828

Merged
merged 1 commit into from
May 19, 2020

Conversation

stensrud
Copy link
Contributor

typeof null === "object"

@djhi
Copy link
Collaborator

djhi commented May 19, 2020

Thanks for contributing :) Can you please explain the issue solved by this PR?

@stensrud
Copy link
Contributor Author

My GraphQL schema has fields with [String] type, the string being nullable. When a fetched object has a null-value, ex [null], the response parser will crash when trying to run Object.keys(null).reduce(...).

@djhi djhi added this to the 3.5.3 milestone May 19, 2020
@djhi djhi merged commit 8b04ff8 into marmelab:master May 19, 2020
@djhi
Copy link
Collaborator

djhi commented May 19, 2020

Thanks!

@fzaninotto fzaninotto changed the title Avoid treating null-values as objects with keys Fix null value for string array field crashes dataProvider in ra-data-graphql-simple May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants