Skip to content

Commit 8f110fe

Browse files
committed
Math.floor percent.
1 parent 191256e commit 8f110fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/node-progress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ ProgressBar.prototype.render = function (tokens) {
126126
var ratio = this.curr / this.total;
127127
ratio = Math.min(Math.max(ratio, 0), 1);
128128

129-
var percent = ratio * 100;
129+
var percent = Math.floor(ratio * 100);
130130
var incomplete, complete, completeLength;
131131
var elapsed = new Date - this.start;
132132
var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1);

0 commit comments

Comments
 (0)