make sure unfilled is not negative

v1.18.x
Barış Soner Uşaklı 7 years ago
parent ea8cf6545c
commit 13e56ad5f3

@ -205,7 +205,7 @@ Upgrade.incrementProgress = function (value) {
if (this.total) { if (this.total) {
percentage = Math.floor((this.current / this.total) * 100) + '%'; percentage = Math.floor((this.current / this.total) * 100) + '%';
filled = Math.floor((this.current / this.total) * 15); filled = Math.floor((this.current / this.total) * 15);
unfilled = 15 - filled; unfilled = Math.min(0, 15 - filled);
} }
readline.cursorTo(process.stdout, 0); readline.cursorTo(process.stdout, 0);

Loading…
Cancel
Save