The apply() method does not work on Node's eventemitter's emit function.
I execute these 2 statements:
this._baseEmitter.emit('activity', {test: 'zever1'});
this._baseEmitter.emit.apply(this, ['activity', {test: 'zever2'}]);
The first 1 runs fine, and the event is captured by my listener.
The second one, however, does absolutely nothing.
Does anyone know why? Is the emit() function perhaps missing the apply method? If so, I would think I would receive some error messages, but that's not the case either.
Shouldn't the first parameter be this._baseEmitter instead?
this._baseEmitter.emit.apply(this._baseEmitter, ['activity', {test: 'zever2'}]);