prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 559 forks source link

Uncaught TypeError: u.indexOf is not a function when using populates on useFirestoreConnect #1053

Closed ddnazzah closed 3 years ago

ddnazzah commented 3 years ago

useFirestoreConnect([ { collection: 'volumes', orderBy: ['created_at', 'desc'], }, { collection: 'reports', orderBy: ['created_at', 'desc'], populates: [{ child: 'volume_id', root: 'volumes' }], }, ])

I want to get a data response where the volume_id on the reports collection will fetch the actual data from firestore instead of the reference type object.

"redux": "^4.0.5" "react-redux": "^7.2.2", "react-redux-firebase": "^3.8.1", "react": "^17.0.1", "redux-firestore": "^0.14.0",

prescottprue commented 3 years ago

I believe that currently populates doesn't work with reference type objects - described in this issue. Going to close as a duplicate

ddnazzah commented 3 years ago

Thank you