Skip to content

Commit

Permalink
Fix a bug in event emitter impl
Browse files Browse the repository at this point in the history
  • Loading branch information
skozin committed Apr 22, 2016
1 parent d8bf74c commit 10464e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/event-emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ const EventEmitterMixin = {
case 1: emitNone(listeners, this); break
case 2: emitOne(listeners, this, arguments[1]); break
case 3: emitTwo(listeners, this, arguments[1], arguments[2]); break
default: emitMany(listeners, this, Array.apply(null, arguments)); break
default: {
let args = Array.apply(null, arguments)
args.shift()
emitMany(listeners, this, args)
}
}
return true
}
Expand Down

0 comments on commit 10464e9

Please sign in to comment.