aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/spread.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lodash/spread.js')
-rw-r--r--node_modules/lodash/spread.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/node_modules/lodash/spread.js b/node_modules/lodash/spread.js
index 3e437dba1..60a08e22e 100644
--- a/node_modules/lodash/spread.js
+++ b/node_modules/lodash/spread.js
@@ -48,18 +48,14 @@ function spread(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
- start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start],
- lastIndex = args.length - 1,
otherArgs = castSlice(args, 0, start);
if (array) {
arrayPush(otherArgs, array);
}
- if (start != lastIndex) {
- arrayPush(otherArgs, castSlice(args, start + 1));
- }
return apply(func, this, otherArgs);
});
}