Added checks

This commit is contained in:
Ludovic PETRENKO 2019-03-24 19:32:53 -07:00
parent 6ac84d4fbd
commit 8efee08e34

View file

@ -99,6 +99,9 @@ export default class EventEmitter{
}
dispatchModule(path, mod, event, args){
if(mod._rawModule.actions) {
const action_prefixed_event = this.actionPrefix + event;
// If the action exists in the module dispatch it
@ -111,7 +114,9 @@ export default class EventEmitter{
this.store.dispatch(fullKey, args);
}
if(this.mutationPrefix){
}
if(this.mutationPrefix && mod._rawModule.mutations) {
const mutation_prefixed_event = this.mutationPrefix + event;