diff --git a/apps/discord-bot/src/commands/ratios/ratios.command.tsx b/apps/discord-bot/src/commands/ratios/ratios.command.tsx index 854c04db9..a14bdad9b 100644 --- a/apps/discord-bot/src/commands/ratios/ratios.command.tsx +++ b/apps/discord-bot/src/commands/ratios/ratios.command.tsx @@ -246,9 +246,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];