Simplify slice.

This commit is contained in:
David Braun 2018-08-27 16:34:40 -04:00
parent 4494e56dc5
commit cd1a4a4e96
No known key found for this signature in database
GPG key ID: 87EC41ADF710B7E2

View file

@ -252,11 +252,7 @@ const Channel = function(length = 0) {
(async () => {
// Consume values before the starting point.
for (let index = 0; index < start; index++) {
const value = await readOnly.shift();
if (value === undefined) {
break;
}
await readOnly.shift();
}
for (let index = start; index < end; index++) {