Skip to content

Commit 91fec38

Browse files
committed
Fix the 2023-2023 Fall-Winter Playoff bug
1 parent 8babe21 commit 91fec38

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/services/CurrentTeams.tsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,20 @@ async function getFiveVFiveSeasons(): Promise<Array<{ name: string; id: number }
3939
name: x.name,
4040
id: x.id,
4141
}));
42-
console.log({ ans });
42+
43+
ans.forEach((season) => {
44+
const SEASON_REMAP: { [id: string]: string | null } = {
45+
// So apparently they named the playoffs incorrectly. I guess I'll just include a generalized rename
46+
// to handle this if it happens in the future.
47+
["2023-2023 SKAHL Fall-Winter Playoffs"]: "2023-2024 SKAHL Fall-Winter Playoffs",
48+
};
49+
if (SEASON_REMAP[season.name]) {
50+
season.name = SEASON_REMAP[season.name] as string;
51+
} else {
52+
return season;
53+
}
54+
});
55+
4356
return ans;
4457
}
4558

0 commit comments

Comments
 (0)