Closed adam-remotesocial closed 3 years ago
Thanks for reaching out! This is for sure an issue - should be able to be solved by checking for events before calling the forEach
@prescottprue Could you please respond to #1008?
The v3.8.1 release includes a fix for this. Reach out if it isn't working as expected thanks for reporting!
Thanks a ton!
https://github.com/prescottprue/react-redux-firebase/blob/e67bbd71ab25fc4830d881431a1661a93b316efc/src/actions/query.js#L221
For example if I write
In this case,
unwatchEvents
is called on unmount of the component, butevents
is undefined soevents.forEach
throws.Workaround - create a new component to house queries that is only mounted when the query inputs are available.