1
0
Fork 0
mirror of synced 2024-09-10 22:46:09 +12:00

Fix bug with sequential helper

This commit is contained in:
Andrew Kingston 2022-07-15 12:01:07 +01:00
parent 80018e9668
commit f0e84b94f5

View file

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