Ensure core build slice has default start and end params. [closes #1789]

This commit is contained in:
John-David Dalton
2016-01-14 01:34:34 -08:00
parent b081b3ae2d
commit 349dfbf182
2 changed files with 7 additions and 5 deletions

2
dist/lodash.core.js vendored
View File

@@ -1583,6 +1583,8 @@
*/
function slice(array, start, end) {
var length = array ? array.length : 0;
start = start == null ? 0 : +start;
end = end === undefined ? length : +end;
return length ? baseSlice(array, start, end) : [];
}