From e81e72e66a4d984b92d2be04d3086abcbe5dbf1b Mon Sep 17 00:00:00 2001 From: Sascha Depold Date: Wed, 16 Apr 2014 20:25:44 +0200 Subject: [PATCH] Proxy all parameters of an event to the respective other emitter --- lib/emitters/custom-event-emitter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/emitters/custom-event-emitter.js b/lib/emitters/custom-event-emitter.js index 62104323d09d..d2fb80c51383 100644 --- a/lib/emitters/custom-event-emitter.js +++ b/lib/emitters/custom-event-emitter.js @@ -127,8 +127,9 @@ module.exports = (function() { options.events = Utils._.difference(options.events, options.skipEvents) options.events.forEach(function (eventKey) { - this.on(eventKey, function (result) { - emitter.emit(eventKey, result) + this.on(eventKey, function () { + var args = [ eventKey ].concat([].slice.apply(arguments)) + emitter.emit.apply(emitter, args) }) }.bind(this))