[Vuejs]-[Vue warn]: Error in render: "TypeError: state.actionInfo.find is not a function"

0👍

I found a solution:

set (value) {
    this.$store.commit('actionInfoValueEdit', { id: Number(this.$route.params.actionId), action: value })
    // store.commit('addCustomer', { id: '2', name: 'User 2'})
  }

I edited set method like this and it worked.

also, I created a new mutation for this;

actionInfoValueEdit: (state, actionInfo) => {
  state.actionInfo.push(actionInfo)
},

I used push function from here.

Leave a comment