Skip to content

Node.js based forum software built for the modern web

fix: tweak upgrade script progress bar to only update 100 times in total

Julian Lamac75c9a0524f
diff --git a/src/upgrade.js b/src/upgrade.js
index 19ccc7d4e2..306870b234 100644
--- a/src/upgrade.js
+++ b/src/upgrade.js
@@ -173,7 +173,7 @@ Upgrade.incrementProgress = function (value) {
this.current += value || 1;
// Redraw the progress bar every 100 units
- if (this.current % 100 === 0) {
+ if (this.current % (this.total ? Math.floor(this.total / 100) : 100) === 0 || this.current === this.total) {
var percentage = 0;
var filled = 0;
var unfilled = 15;