Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Optimize emit for two arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Sep 17, 2010
1 parent 180a048 commit 10af677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/events.js
Expand Up @@ -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]
Expand Down

0 comments on commit 10af677

Please sign in to comment.