minor fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-12-16 05:18:58 +03:00
parent 6076c1ac22
commit 9f39d0a3dd

View File

@ -308,12 +308,13 @@ object.Constructor('Queue', Array, {
: setTimeout(run, 0))
return this },
__onempty__: function(){
var that = this
this.poling_timeout != null ?
// wait a bit then stop if still empty...
setTimeout(function(){
that.length > 0 ?
that.__run_tasks__()
: that.stop(
: that.stop()
}, this.poling_timeout)
// stop now...
: this.stop()