mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 08:00:43 +00:00
fix leaderboard when 100%
This commit is contained in:
@@ -185,6 +185,9 @@ export class Leaderboard extends LitElement implements Layer {
|
|||||||
|
|
||||||
function formatPercentage(value: number): string {
|
function formatPercentage(value: number): string {
|
||||||
const perc = value * 100
|
const perc = value * 100
|
||||||
|
if (perc > 99.5) {
|
||||||
|
return "100%"
|
||||||
|
}
|
||||||
if (perc < .01) {
|
if (perc < .01) {
|
||||||
return "0%"
|
return "0%"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user