Skip to content

Commit f37469e

Browse files
committed
run render if throttle is zero
1 parent d84326e commit f37469e

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)