From b0164b694848452af415d88915c3a0b915c29b82 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:15:24 -0300 Subject: [PATCH] feat: simplify conditional --- src/main/events/catalogue/get-random-game.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/events/catalogue/get-random-game.ts b/src/main/events/catalogue/get-random-game.ts index 0f0341b4..72b93c33 100644 --- a/src/main/events/catalogue/get-random-game.ts +++ b/src/main/events/catalogue/get-random-game.ts @@ -14,10 +14,8 @@ const filterGames = async (games: Steam250Game[]) => { for (const game of games) { const steamGame = await getSteamGameById(game.objectID); - if (steamGame) { - if (steamGame.repacks.length) { - results.push(game); - } + if (steamGame?.repacks.length) { + results.push(game); } }