|
|
|
@ -52,9 +52,9 @@ export default class{
|
|
|
|
|
|
|
|
|
|
if(!action.startsWith('socket_')) continue
|
|
|
|
|
|
|
|
|
|
let camelcased = 'socket_'+event
|
|
|
|
|
let camelcased = 'socket_'+event.toLowerCase()
|
|
|
|
|
.replace('SOCKET_', '')
|
|
|
|
|
.replace(/^([A-Z])|[\W\s_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase())
|
|
|
|
|
.replace(/[\W\s_]+(\w)/g, (match, p1) => p1.toUpperCase())
|
|
|
|
|
|
|
|
|
|
if(action === camelcased) this.store.dispatch(namespaced, payload)
|
|
|
|
|
}
|
|
|
|
|