mirror of https://github.com/nodejs/node.git
parent
eb502205d5
commit
0506d294dc
|
@ -137,8 +137,8 @@ EventEmitter.prototype.addListener = function(type, listener) {
|
||||||
|
|
||||||
if (!this._events) this._events = {};
|
if (!this._events) this._events = {};
|
||||||
|
|
||||||
// To avoid recursion in the case that type == "newListeners"! Before
|
// To avoid recursion in the case that type == "newListener"! Before
|
||||||
// adding it to the listeners, first emit "newListeners".
|
// adding it to the listeners, first emit "newListener".
|
||||||
if (this._events.newListener) {
|
if (this._events.newListener) {
|
||||||
this.emit('newListener', type, typeof listener.listener === 'function' ?
|
this.emit('newListener', type, typeof listener.listener === 'function' ?
|
||||||
listener.listener : listener);
|
listener.listener : listener);
|
||||||
|
|
Loading…
Reference in New Issue