Skip to content

Commit

Permalink
fix: mistake in bot code
Browse files Browse the repository at this point in the history
  • Loading branch information
zkrising committed Jul 14, 2024
1 parent b8d05b8 commit 94e9def
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bot/src/utils/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ export function FormatClass(
const gptConfig = GetGamePTConfig(game, playtype);

// @ts-expect-error hacky access
const classInfo: ClassInfo = gptConfig.classes[classSet]?.find?.((k) => k.id === classValue);
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
const classInfo: ClassInfo = gptConfig.classes[classSet]?.values?.find?.(
(k) => k.id === classValue
);

if (!classInfo) {
throw new Error(
Expand Down

0 comments on commit 94e9def

Please sign in to comment.