diff --git a/src/EventEmitter.js b/src/EventEmitter.js index 5e9ceb916..384a1011e 100644 --- a/src/EventEmitter.js +++ b/src/EventEmitter.js @@ -183,13 +183,9 @@ EventEmitter.prototype = { // Fire event listeners var args = Array.prototype.slice.call(arguments, 1); - this.events[event].map(function (listener) { - return function () { - listener.listener.apply(this, args); - }.bind(listener.bindTarget || this); - }, this).forEach(function (boundListener) { + this.events[event].slice().forEach(function (listener) { try { - boundListener(); + listener.listener.apply(listener.bindTarget || this, args); } catch(err) { this.logger.error(err.stack); }