christianmalek / vuex-rest-api

A utility to simplify the use of REST APIs with Vuex
http://vuex-rest-api.org
MIT License
382 stars 48 forks source link

Adding getters not working #72

Closed go4cas closed 6 years ago

go4cas commented 6 years ago

When adding actions or mutations to the Vapi instance, works fine. But, when trying to add a getter, using this: positionStore.getters.getField = getField;, I get this error: "Cannot set property 'getField' of undefined". Am I missing something?

go4cas commented 6 years ago

Okay, doing this solved the issue:

positionStore.getters = {
  getField,
};