fix(actions): properly transform action to store action

pull/118/head
Sergey Stotskiy 7 years ago
parent 8951667903
commit ce541e7da9

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

Loading…
Cancel
Save