From 13e56ad5f3e02d40b63bc402c4584738b1aa5c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 18 Dec 2017 21:00:49 -0500 Subject: [PATCH] make sure unfilled is not negative --- src/upgrade.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);