Optimize emit for two arguments

This commit is contained in:
Ryan Dahl committed 2010-09-17 11:18:54 -07:00
1 parent 180a04805b
commit 10af67714b
1 file changed
+1 -1
+1 -1
View File
@@ -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]