events: fix typos in code comment

- newListeners -> newListener
pull/24504/head
Ryunosuke SATO 2012-12-10 18:32:56 +09:00 committed by Ben Noordhuis
parent eb502205d5
commit 0506d294dc
1 changed files with 2 additions and 2 deletions

View File

@ -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);