Skip to content

Commit 9661783

Browse files
committed
Use correct buffer length in queue clear method
1 parent 0bfc0e2 commit 9661783

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class Queue<T> {
5656

5757
clear() {
5858
for (let i = 0; i < this._size; i++) {
59-
this.buffer[(this.head + i) % this._size] = undefined
59+
this.buffer[(this.head + i) % this.buffer.length] = undefined
6060
}
6161

6262
this.head = 0

0 commit comments

Comments
 (0)