[Vuejs]-Getting an object instead a number from rootState vuex

0๐Ÿ‘

โœ…

My error is in the "store/modules/tables.js"

I forgot to add {commit} argument..

before

const actions = {
    setActiveTableId (id) {
        this.commit('SET_ACTIVE_TABLE', id)
    }
}
after
const actions = {
    setActiveTableId ({commit},id) {
        this.commit('SET_ACTIVE_TABLE', id)
    }
}

Thanks all

Leave a comment