mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Ensure core build slice has default start and end params. [closes #1789]
This commit is contained in:
2
dist/lodash.core.js
vendored
2
dist/lodash.core.js
vendored
@@ -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) : [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user