Skip to content

Node.js based forum software built for the modern web

make sure unfilled is not negative

Barış Soner Uşaklı13e56ad5f3e0
diff --git a/src/upgrade.js b/src/upgrade.js
index a0ceb5b7df..b4d9f4751c 100644
--- a/src/upgrade.js
+++ b/src/upgrade.js
@@ -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);