mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +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) {
|
||||
var length = array.length;
|
||||
|
||||
start = start == null ? 0 : toInteger(start);
|
||||
start = toInteger(start);
|
||||
if (start < 0) {
|
||||
start = -start > length ? 0 : (length + start);
|
||||
}
|
||||
@@ -2411,10 +2411,8 @@
|
||||
if (end < 0) {
|
||||
end += length;
|
||||
}
|
||||
length = start > end ? 0 : (end >>> 0);
|
||||
start >>>= 0;
|
||||
|
||||
while (start < length) {
|
||||
end = start > end ? 0 : toLength(end);
|
||||
while (start < end) {
|
||||
array[start++] = value;
|
||||
}
|
||||
return array;
|
||||
|
||||
Reference in New Issue
Block a user