From ae8f8e7258bb9db0bc6928e9dc1cd535d95a7910 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 15 Sep 2010 15:20:04 -0700 Subject: [PATCH] Optimize emit for two arguments --- lib/events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/events.js b/lib/events.js index 6b422d1..69cfc4f 100644 --- a/lib/events.js +++ b/lib/events.js @@ -21,7 +21,7 @@ process.EventEmitter.prototype.emit = function (type) { if (!this._events[type]) return false; if (typeof this._events[type] == 'function') { - if (arguments.length < 3) { + if (arguments.length <= 3) { // fast case this._events[type].call( this , arguments[1] -- 2.7.4