Skip to content

Commit

Permalink
Merge pull request #149 from larshp/master
Browse files Browse the repository at this point in the history
run render if throttle is zero
  • Loading branch information
thebigredgeek authored May 10, 2017
2 parents d84326e + f37469e commit 52173f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/node-progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ ProgressBar.prototype.tick = function(len, tokens){
this.curr += len

// schedule render
if (!this.renderThrottleTimeout) {
if (this.renderThrottle === 0) {
this.render();
} else if (!this.renderThrottleTimeout) {
this.renderThrottleTimeout = setTimeout(this.render.bind(this), this.renderThrottle);
}

Expand Down

0 comments on commit 52173f0

Please sign in to comment.