Skip to content

Commit

Permalink
Freshen generated index.js file.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Dec 23, 2024
1 parent 06f25ed commit d48ef1a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7782,19 +7782,19 @@ function queueAsPromised (context, worker, _concurrency) {
}

function drained () {
if (queue.idle()) {
return new Promise(function (resolve) {
resolve()
})
}

var previousDrain = queue.drain

var p = new Promise(function (resolve) {
queue.drain = function () {
previousDrain()
resolve()
}
process.nextTick(function () {
if (queue.idle()) {
resolve()
} else {
var previousDrain = queue.drain
queue.drain = function () {
if (typeof previousDrain === 'function') previousDrain()
resolve()
queue.drain = previousDrain
}
}
})
})

return p
Expand Down

0 comments on commit d48ef1a

Please sign in to comment.