Skip to content

Commit

Permalink
Fix the 2023-2023 Fall-Winter Playoff bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbenti committed Mar 1, 2024
1 parent 8babe21 commit 91fec38
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/services/CurrentTeams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,20 @@ async function getFiveVFiveSeasons(): Promise<Array<{ name: string; id: number }
name: x.name,
id: x.id,
}));
console.log({ ans });

ans.forEach((season) => {
const SEASON_REMAP: { [id: string]: string | null } = {
// So apparently they named the playoffs incorrectly. I guess I'll just include a generalized rename
// to handle this if it happens in the future.
["2023-2023 SKAHL Fall-Winter Playoffs"]: "2023-2024 SKAHL Fall-Winter Playoffs",
};
if (SEASON_REMAP[season.name]) {
season.name = SEASON_REMAP[season.name] as string;
} else {
return season;
}
});

return ans;
}

Expand Down

0 comments on commit 91fec38

Please sign in to comment.