Fix bug with sequential helper

This commit is contained in:
Andrew Kingston 2022-07-15 12:01:07 +01:00
parent 80018e9668
commit f0e84b94f5
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ export const sequential = fn => {
return async (...params) => {
queue.push(async () => {
await fn(...params)
queue.pop()
queue.shift()
if (queue.length) {
await queue[0]()
}