refactor: reduce code redundance

This commit is contained in:
JackEnx 2024-12-16 16:35:12 -03:00
parent 08d320ad1c
commit c2a52d3c18

View File

@ -43,17 +43,9 @@ const gamesIdWithoutPath = async () => {
}, },
}); });
const gameExecutableIds: string[] = []; return games
.filter((game) => gameExecutables[game.objectID])
for (const game of games) { .map((game) => game.objectID);
const has = gameExecutables[game.objectID];
if (has) {
gameExecutableIds.push(game.objectID);
}
}
return gameExecutableIds;
}; };
const findGamePathByProcess = ( const findGamePathByProcess = (