Skip to content

Commit

Permalink
emit return promise
Browse files Browse the repository at this point in the history
  • Loading branch information
mprzodala committed Nov 13, 2020
1 parent 79ed703 commit 1a8dc06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Eventrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Eventrix {
return this.stateManager.getState(path);
}
emit(name, value) {
this.eventsEmitter.emit(name, value);
return this.eventsEmitter.emit(name, value);
}
listen(name, listener) {
this.eventsEmitter.listen(name, listener);
Expand Down
1 change: 1 addition & 0 deletions src/EventsEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class EventsEmitter {
})
}
this.runListeners(name, data, receiversResponse);
return Promise.resolve(receiversResponse);
}
}

Expand Down

0 comments on commit 1a8dc06

Please sign in to comment.