joyent/node — pull request #6568 by jmar777 (2013-11-22 14:24:34+00:00)
Title: events: fix TypeError in removeAllListeners

In the (very specific) situation in which an `EventEmitter` has a listener for the `removeListener` event, *and* `removeAllListeners()` is called using an event type that doesn't exist, `removeAllListeners()` currently throws a TypeError on `listeners.length` (as `listeners` is undefined).