mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
Optimize emit for two arguments
This commit is contained in:
1 parent
180a04805b
commit
10af67714b
1 file changed
+1
-1
+1
-1
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user