From ce541e7da9666086a9c3da771c5a2a85f70e1f5a Mon Sep 17 00:00:00 2001 From: Sergey Stotskiy Date: Tue, 30 Jan 2018 15:56:39 +0200 Subject: [PATCH] fix(actions): properly transform action to store action --- src/Observer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Observer.js b/src/Observer.js index f6be963..86b400e 100755 --- a/src/Observer.js +++ b/src/Observer.js @@ -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)