Skip to content

Commit 30d70d9

Browse files
Merge pull request #141 from trenskow/master
Math.floor percent
2 parents 52173f0 + 8f110fe commit 30d70d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/node-progress.js

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

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

0 commit comments

Comments
 (0)