Cleanup baseFill.

This commit is contained in:
Xotic750
2015-11-04 01:20:10 +01:00
committed by John-David Dalton
parent b9b94609f5
commit 9db252e55d

View File

@@ -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;