[Vuejs]-TypeError: Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]()

4👍

The problem is with your this lines of code:

set_poject([commit], paylod) {
    commit("SET_PROJECT", paylod);
  }

Actually the commit is inside object, and you cannot destructure object as array. So when you try to do that, it gives the error destructure non-iterable instance.

Update the code like this:

set_poject({commit}, paylod) {
    commit("SET_PROJECT", paylod);
  }

Leave a comment