Fix counterpick all won modes getting banned

This commit is contained in:
Kalle
2024-04-03 23:28:17 +03:00
parent 5b66148857
commit 9177ae404c

View File

@@ -197,9 +197,11 @@ function unavailableModes({
}): Set<ModeShort> {
if (!maps?.pickBan || maps.pickBan === "BAN_2") return new Set();
// can't pick the same mode last won on
const result = new Set(
results
.filter((result) => result.winnerTeamId === pickerTeamId)
.slice(-1)
.map((result) => result.mode),
);