mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
Update Observer.js
Added namespaced mutations support
This commit is contained in:
parent
57887ea0a1
commit
22d066fa88
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ export default class{
|
|||
if(!event.startsWith('SOCKET_')) return
|
||||
|
||||
for(let namespaced in this.store._mutations) {
|
||||
let mutation = namespaced.split('/').pop()
|
||||
let mutation = ('SOCKET_' + namespaced.replace('SOCKET_','')).toUpperCase();
|
||||
if(mutation === event.toUpperCase()) this.store.commit(namespaced, payload)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue