Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Response.content in Redux CRUD actions may cause conflicts with some data #42

Open
freeweel opened this issue Aug 4, 2020 · 0 comments

Comments

@freeweel
Copy link

freeweel commented Aug 4, 2020

I used the getDoc() method in /ui/src/redux/crud/actions/index.js

In line 37 of the code (v2.0.1 per the pkg.json):

return { content: response.content || response, ... }

It just so happened that the data I was trying to return from the transform had a .content field as the first child. So I always got the child data instead of the root that I was expecting. Took me quite a while to figure out why this was happening.

I don't know the use case for response.content, but it does create a problem if your data has a root.content

Paul Vanderveen ([email protected]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant