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

"TypeError: Cannot read property 'where' of undefined" only with fetchAndAdd #303

Closed justice47 closed 4 years ago

justice47 commented 4 years ago

I'm having error when trying to execute this:

this.$store.dispatch("resultsDetailedModule/fetchAndAdd", {
        pathVariables: {
          sessionID: this.$store.getters.SELECTED_SESSION.id,
          resultID: this.$store.state.resultsModule.selectedResult.id
        }
      });

But then I'm changing fetchAndAdd to openDBChannel all is working right. Here is the error: image

mesqueeb commented 4 years ago

Thanks for reporting. I probably know how to fix this bug, but might not be able to immediately fix it. Just about to head to bed.

As a work around can you try this for now?

this.$store.dispatch("resultsDetailedModule/fetchAndAdd", {
          sessionID: this.$store.getters.SELECTED_SESSION.id,
          resultID: this.$store.state.resultsModule.selectedResult.id
      });
justice47 commented 4 years ago

@mesqueeb thanks for a really quick reply!

Unfortunately I've got another error in this case: image

mesqueeb commented 4 years ago

Hi @justice47 👋🏻 The latest version should have fixed this!

Let me know how it goes 😉

--
Vuex Easy Firestore was made with ♥ by Luca Ban.
If you use this library in your projects, you can support the maintenance of this library by a small contribution via Github 💜.
You can also reach out on twitter if you want a one-on-one coding review/lesson. 🦜