Simplify slice
.
This commit is contained in:
parent
4494e56dc5
commit
cd1a4a4e96
1 changed files with 1 additions and 5 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue