Skip to content

Commit

Permalink
fix: "What?" - Richard Nixon
Browse files Browse the repository at this point in the history
  • Loading branch information
zkrising committed Jun 25, 2024
1 parent f920e29 commit f0c5ef8
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,11 @@ function TierlistBreakdown({ game, folderDataset, playtype, reqUser }: InfoProps
[tierlist]
);

const tierlistImpl = gptImpl.ratingSystems.find(
// @ts-expect-error Typescript doesn't like our unioning here for some reason
// and i can't be bothered to figure it out
const tierlistImpl: GPTRatingSystem<GPTString> = gptImpl.ratingSystems.find(
(rs) => rs.name === tierlist
) as GPTRatingSystem<GPTString>;
);

if (!tierlistImpl) {
return <>(E) no tierlist impl (howd you get here?)</>;
Expand Down Expand Up @@ -762,9 +764,10 @@ function FolderDatasetAchievedStatus(
) {
const tierlistInfo: Record<string, { status: AchievedStatuses; score: string | null }> = {};

const fn = GPT_CLIENT_IMPLEMENTATIONS[`${game}:${playtype}` as GPTString].ratingSystems.find(
(e) => e.name === tierlist
)?.achievementFn as GPTRatingSystem<GPTString>["achievementFn"];
// @ts-expect-error shut up
const fn: GPTRatingSystem<GPTString>["achievementFn"] = GPT_CLIENT_IMPLEMENTATIONS[
`${game}:${playtype}` as GPTString
].ratingSystems.find((e) => e.name === tierlist)?.achievementFn;

for (const data of folderDataset) {
let achieved: AchievedStatuses;
Expand Down

0 comments on commit f0c5ef8

Please sign in to comment.