Skip to content

Commit

Permalink
fix: tweak upgrade script progress bar to only update 100 times in total
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Aug 14, 2020
1 parent 80a2a70 commit ac75c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/upgrade.js
Expand Up @@ -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;
Expand Down

0 comments on commit ac75c9a

Please sign in to comment.