File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ ProgressBar.prototype.tick = function(len, tokens){
9898
9999 // progress complete
100100 if ( this . curr >= this . total ) {
101- this . render ( ) ;
101+ this . render ( undefined , true ) ;
102102 this . complete = true ;
103103 this . terminate ( ) ;
104104 this . callback ( this ) ;
@@ -114,14 +114,14 @@ ProgressBar.prototype.tick = function(len, tokens){
114114 * @api public
115115 */
116116
117- ProgressBar . prototype . render = function ( tokens ) {
117+ ProgressBar . prototype . render = function ( tokens , force = false ) {
118118 if ( tokens ) this . tokens = tokens ;
119119
120120 if ( ! this . stream . isTTY ) return ;
121121
122122 var now = Date . now ( ) ;
123123 var delta = now - this . lastRender ;
124- if ( delta < this . renderThrottle ) {
124+ if ( ! force && ( delta < this . renderThrottle ) ) {
125125 return ;
126126 } else {
127127 this . lastRender = now ;
You can’t perform that action at this time.
0 commit comments