Add namespaced mutation for Vuex

pull/39/head
Michgeek 7 years ago
parent 51f5a95014
commit 7abefc3bad

4
dist/build.js vendored

File diff suppressed because one or more lines are too long

@ -41,8 +41,12 @@ export default class{
if(type.split('_')[0].toUpperCase() === 'SOCKET'){
if(this.store._mutations[type])
this.store.commit(type, payload)
for (let namespaced in this.store._mutations) {
let mutation = namespaced.split('/').pop()
if (mutation === type)
this.store.commit(namespaced, payload)
}
}

Loading…
Cancel
Save