Allocate proper size in in _.restParam.

Since we're putting `rest` at `start` index, `array.length; // => {start + 1}`
This commit is contained in:
Justin Ridgewell
2015-03-15 13:06:57 -04:00
committed by jdalton
parent 05fd7cecf4
commit fec940ab8b

View File

@@ -7969,7 +7969,7 @@
case 1: return func.call(this, args[0], rest);
case 2: return func.call(this, args[0], args[1], rest);
}
var otherArgs = Array(start);
var otherArgs = Array(start + 1);
index = -1;
while (++index < start) {
otherArgs[index] = args[index];