Fix bug with sequential helper
This commit is contained in:
parent
80018e9668
commit
f0e84b94f5
|
@ -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]()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue