Skip to content

Commit

Permalink
fix emit
Browse files Browse the repository at this point in the history
  • Loading branch information
arandaschimpf committed May 22, 2017
1 parent da9b6fa commit 3c870ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/instance/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ Moon.prototype.emit = function(eventName, customMeta) {
var globalHandlers = this.$events["*"];

// Call all handlers for the event name
for(var i = 0; i < handlers.length; i++) {
handlers[i](meta);
if(handlers !== undefined) {
for(var i = 0; i < handlers.length; i++) {
handlers[i](meta);
}
}

if(globalHandlers !== undefined) {
Expand Down

0 comments on commit 3c870ee

Please sign in to comment.