Skip to content

Commit 28e8a84

Browse files
Quick fix for filtering out incomplete winrates
1 parent 33906e1 commit 28e8a84

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/pages/stats.astro

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function mapFactionWinrate(race: StatsByTimeEntry) {
2121
const pickrate = round(race.aggregated.pick_rate!)
2222
const labels: string[] = []
2323
const data: number[] = []
24+
if(!race.history.at(-1)?.matches_count) race.history.pop()
2425
for (const entry of race.history) {
2526
labels.push(new Date(entry.date!).toLocaleDateString("en-US", { month: "short", day: "numeric" }))
2627
data.push(round(entry.win_rate!))

0 commit comments

Comments
 (0)