diff --git a/lib/events.js b/lib/events.js index e7202bfedd0c55..e745c087fdfb48 100644 --- a/lib/events.js +++ b/lib/events.js @@ -195,9 +195,9 @@ EventEmitter.prototype.emit = function emit(type) { break; // slower default: - args = new Array(len - 1); + args = []; for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; + args.push(arguments[i]); emitMany(handler, isFn, this, args); }