You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
If a query string has a collection and subcollection but not a docId it's an invalid query. No error is getting thrown.
What is the expected behavior?
In the queryStrToObj function, if there is a collection and subcollection, there must always be a doc. I assume an error would be thrown just like in the getQueryConfig function below it.
prescottprue
changed the title
Queries with a collection & subcollection but an empty doc fail silently
bug(query): queries with a collection & subcollection but an empty doc fail silently
Mar 13, 2020
What is the current behavior?
If a query string has a collection and subcollection but not a docId it's an invalid query. No error is getting thrown.
What is the expected behavior?
In the
queryStrToObj
function, if there is a collection and subcollection, there must always be a doc. I assume an error would be thrown just like in thegetQueryConfig
function below it.redux-firestore/src/utils/query.js
Lines 436 to 438 in a0bab1f
Which version of redux-firestore are you using? What about other dependencies?
v0.12.0
Which environments/browsers are affected by this issue? Did this work in previous versions or setups?
all
Minimal demo to reproduce issue (using codesandbox or similar)
I would assume there to be a check in the
queryStrToObj
and a corresponding unit test to validate.redux-firestore/src/utils/query.js
Lines 406 to 416 in a0bab1f
A check could be something like:
The text was updated successfully, but these errors were encountered: