From 69867e9c51b9ca20eeb05c8a3f77b3bcd25cee2f Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sat, 13 Jul 2024 22:52:25 +0100 Subject: [PATCH] fix: crash in bot --- bot/src/utils/misc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/utils/misc.ts b/bot/src/utils/misc.ts index 0276a00fb..6e9bf893f 100644 --- a/bot/src/utils/misc.ts +++ b/bot/src/utils/misc.ts @@ -78,7 +78,7 @@ export function FormatClass( const gptConfig = GetGamePTConfig(game, playtype); // @ts-expect-error hacky access - const classInfo: ClassInfo = gptConfig.classes[classSet]?.find((k) => k.id === classValue); + const classInfo: ClassInfo = gptConfig.classes[classSet]?.find?.((k) => k.id === classValue); if (!classInfo) { throw new Error(