From 0661cbd6618f460bfa059443d3a5217d1878904b Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Tue, 31 Dec 2024 19:32:41 -0300 Subject: [PATCH] fix: steamGenres --- src/renderer/src/pages/catalogue/game-item.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/catalogue/game-item.tsx b/src/renderer/src/pages/catalogue/game-item.tsx index 8fb4c1b6..18454870 100644 --- a/src/renderer/src/pages/catalogue/game-item.tsx +++ b/src/renderer/src/pages/catalogue/game-item.tsx @@ -31,11 +31,11 @@ export function GameItem({ game }: GameItemProps) { const genres = useMemo(() => { return game.genres?.map((genre) => { - const index = steamGenres["en"].findIndex( + const index = steamGenres["en"]?.findIndex( (steamGenre) => steamGenre === genre ); - if (steamGenres[language] && steamGenres[language][index]) { + if (index && steamGenres[language] && steamGenres[language][index]) { return steamGenres[language][index]; }