From d3525aeb7ff9896e7ea9b6bad65133315d203fd6 Mon Sep 17 00:00:00 2001 From: zkx5xkt <58633293+zkx5xkt@users.noreply.github.com> Date: Tue, 3 Jan 2023 15:12:44 +0200 Subject: [PATCH] fix #61 (#62) Co-authored-by: someone --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0a589ea..7209bb4 100644 --- a/index.js +++ b/index.js @@ -121,7 +121,6 @@ Queue.prototype.push = function (value) { Queue.prototype.shift = function () { if (this._shiftIndex === blockSize) { - this._shiftIndex = 0; var s2 = this._s2; if (s2.length === 0) { var s1 = this._s1; @@ -131,6 +130,7 @@ Queue.prototype.shift = function () { this._s1 = s2; s2 = this._s2 = s1.reverse(); } + this._shiftIndex = 0; this._shiftBlock = s2.pop(); } if (