diff --git a/apps/discord-bot/src/commands/ratios/ratios.command.tsx b/apps/discord-bot/src/commands/ratios/ratios.command.tsx index bdd522891..82bd3900a 100644 --- a/apps/discord-bot/src/commands/ratios/ratios.command.tsx +++ b/apps/discord-bot/src/commands/ratios/ratios.command.tsx @@ -249,9 +249,9 @@ export class RatiosCommand { private getModeStats(game: PlayerStats[keyof PlayerStats], mode: GameModeWithSubModes) { if (mode.submodes.length !== 0) { - let stats = game[mode.api as keyof typeof game]; - stats = stats[mode.submodes[0].api as keyof typeof game]; - return mode.submodes[0].api === "overall" ? stats || game : stats; + const stats = game[mode.api as keyof typeof game]; + const submodeStats = stats[mode.submodes[0].api as keyof typeof stats]; + return mode.submodes[0].api === "overall" ? submodeStats || stats : submodeStats; } const stats = game[mode.api as keyof typeof game];