mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Cleanup baseFill.
This commit is contained in:
committed by
John-David Dalton
parent
b9b94609f5
commit
9db252e55d
@@ -2403,7 +2403,7 @@
|
|||||||
function baseFill(array, value, start, end) {
|
function baseFill(array, value, start, end) {
|
||||||
var length = array.length;
|
var length = array.length;
|
||||||
|
|
||||||
start = start == null ? 0 : toInteger(start);
|
start = toInteger(start);
|
||||||
if (start < 0) {
|
if (start < 0) {
|
||||||
start = -start > length ? 0 : (length + start);
|
start = -start > length ? 0 : (length + start);
|
||||||
}
|
}
|
||||||
@@ -2411,10 +2411,8 @@
|
|||||||
if (end < 0) {
|
if (end < 0) {
|
||||||
end += length;
|
end += length;
|
||||||
}
|
}
|
||||||
length = start > end ? 0 : (end >>> 0);
|
end = start > end ? 0 : toLength(end);
|
||||||
start >>>= 0;
|
while (start < end) {
|
||||||
|
|
||||||
while (start < length) {
|
|
||||||
array[start++] = value;
|
array[start++] = value;
|
||||||
}
|
}
|
||||||
return array;
|
return array;
|
||||||
|
|||||||
Reference in New Issue
Block a user