Optimize emit for two arguments
This commit is contained in:
parent
feea1330cc
commit
ae8f8e7258
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user