Skip to content

Commit

Permalink
fix(Rank): parse int for width
Browse files Browse the repository at this point in the history
  • Loading branch information
twlite committed Jul 29, 2022
1 parent 755f521 commit ccef30e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Rank.js
Expand Up @@ -626,11 +626,11 @@ class Rank {
const rx = this.data.requiredXP.data;

if (rx <= 0) return 1;
if (cx > rx) return this.data.progressBar.width;
if (cx > rx) return parseInt(this.data.progressBar.width) || 0;

let width = (cx * 615) / rx;
if (width > this.data.progressBar.width) width = this.data.progressBar.width;
return width;
return parseInt(width) || 0;
}

}
Expand Down

0 comments on commit ccef30e

Please sign in to comment.