mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
events: fix typos in code comment
- newListeners -> newListener
This commit is contained in:
parent
eb502205d5
commit
0506d294dc
@ -137,8 +137,8 @@ EventEmitter.prototype.addListener = function(type, listener) {
|
||||
|
||||
if (!this._events) this._events = {};
|
||||
|
||||
// To avoid recursion in the case that type == "newListeners"! Before
|
||||
// adding it to the listeners, first emit "newListeners".
|
||||
// To avoid recursion in the case that type == "newListener"! Before
|
||||
// adding it to the listeners, first emit "newListener".
|
||||
if (this._events.newListener) {
|
||||
this.emit('newListener', type, typeof listener.listener === 'function' ?
|
||||
listener.listener : listener);
|
||||
|
Loading…
Reference in New Issue
Block a user