make sure unfilled is not negative

This commit is contained in:
Barış Soner Uşaklı
2017-12-18 21:00:49 -05:00
parent ea8cf6545c
commit 13e56ad5f3

View File

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