Skip to content

Commit 52173f0

Browse files
Merge pull request #149 from larshp/master
run render if throttle is zero
2 parents d84326e + f37469e commit 52173f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/node-progress.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ ProgressBar.prototype.tick = function(len, tokens){
9393
this.curr += len
9494

9595
// schedule render
96-
if (!this.renderThrottleTimeout) {
96+
if (this.renderThrottle === 0) {
97+
this.render();
98+
} else if (!this.renderThrottleTimeout) {
9799
this.renderThrottleTimeout = setTimeout(this.render.bind(this), this.renderThrottle);
98100
}
99101

0 commit comments

Comments
 (0)