Closed bekzod closed 6 years ago
Flush is public API, I don’t think we are guaranteed that end users only call it after a length check...
I agree with @rwjblue, we would need to make a private method that is shared to avoid the length check. (which is a fine change, but closing this for now)
quueuItems.length
already checked before calling flush here: https://github.com/BackburnerJS/backburner.js/blob/master/lib/backburner/deferred-action-queues.ts#L64 and here: https://github.com/BackburnerJS/backburner.js/blob/master/lib/backburner/queue.ts#L98