redux-firestore
redux-firestore copied to clipboard
feat(query): warning for invalid query config parameters
Reposting https://github.com/prescottprue/react-redux-firebase/issues/537 in the correct repo.
This turned out to be due to a call to firestore.update() where the path was referring to a collection rather than a doc. This occurred because the doc id was unintentionally null. i.e.
props.firestore.update({ collection: "projects", doc: projectId }, {title: newTitle});
Where projectId was null.
Mainly posting here for posterity, though it would be great if we can catch and report this earlier and log an error instead. Thanks for considering this!
Great suggestion! There have been other issues that would have been clarified with some sort of query config validation.