Skip to content

Commit

Permalink
Merge pull request #45 from pipobscure/pipobscure-issue-44
Browse files Browse the repository at this point in the history
Make sure event.event is always a string
  • Loading branch information
pipobscure authored Jul 4, 2016
2 parents 980de75 + 3c6b93f commit a90bb87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ami.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ function ManagerEvent(context, event) {

if (event.event) {
// This is a Real-Event
event.event = Array.isArray(event.event) ? event.event.shift() : event.event;
event.event += ''; // Make Sure that this is always a string
emits.push(this.emit.bind(this, 'managerevent', event));
emits.push(this.emit.bind(this, event.event.toLowerCase(), event));
if (('userevent' === event.event.toLowerCase()) && event.userevent)
Expand Down

0 comments on commit a90bb87

Please sign in to comment.