mesqueeb / vuex-easy-firestore

Easy coupling of firestore and a vuex module. 2-way sync with 0 boilerplate!
https://mesqueeb.github.io/vuex-easy-firestore
MIT License
234 stars 28 forks source link

Documented limit syntax does not work #299

Open richard-mckenna opened 4 years ago

richard-mckenna commented 4 years ago

In order to set the number of returned items the documentations states you should do this:

dispatch('myModule/fetchAndAdd', {clauses: {limit: 1000}})

But for me this returns the following error:

index.esm.js?34ed:313 Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Store.SET_PATHVARS (index.esm.js?34ed:313)
    at wrappedMutationHandler (vuex.esm.js?2f62:740)
    at commitIterator (vuex.esm.js?2f62:392)
    at Array.forEach (<anonymous>)
    at eval (vuex.esm.js?2f62:391)
    at Store._withCommit (vuex.esm.js?2f62:522)
    at Store.commit (vuex.esm.js?2f62:390)
    at Store.boundCommit [as commit] (vuex.esm.js?2f62:335)
    at local.commit (vuex.esm.js?2f62:692)

I have found that I have to pass empty pathVariables to get it to work:

dispatch('myModule/fetchAndAdd', {pathVariables: {}, clauses: {limit: 1000}})

mesqueeb commented 4 years ago

Thanks for the report !!

Sent with GitHawk

louisameline commented 4 years ago

This has been addressed and will be fixed in a next release