move string concatenation out of loop (#189)

pull/195/head
Slava 6 years ago committed by Metin Seylan
parent 60d38b78bc
commit 6d5c7983d1

@ -91,11 +91,13 @@ export default class EventEmitter{
if(this.store && this.store._actions){
let prefixed_event = this.actionPrefix + event;
for (let key in this.store._actions) {
let action = key.split('/').pop();
if(action === this.actionPrefix+event) {
if(action === prefixed_event) {
Logger.info(`Dispatching Action: ${key}, Data:`, args);
@ -107,11 +109,13 @@ export default class EventEmitter{
if(this.mutationPrefix) {
let prefixed_event = this.mutationPrefix + event;
for (let key in this.store._mutations) {
let mutation = key.split('/').pop();
if(mutation === this.mutationPrefix+event) {
if(mutation === prefixed_event) {
Logger.info(`Commiting Mutation: ${key}, Data:`, args);

Loading…
Cancel
Save