diff --git a/lib/events.js b/lib/events.js index fc933c5fd8..00c2071f28 100644 --- a/lib/events.js +++ b/lib/events.js @@ -48,8 +48,7 @@ EventEmitter.prototype.setMaxListeners = function(n) { // non-global reference, for speed. var PROCESS; -EventEmitter.prototype.emit = function() { - var type = arguments[0]; +EventEmitter.prototype.emit = function(type) { // If there is no 'error' event listener then throw. if (type === 'error') { if (!this._events || !this._events.error ||