mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-02 16:23:48 +03:00
refactor: reduce code redundance
This commit is contained in:
parent
08d320ad1c
commit
c2a52d3c18
@ -43,17 +43,9 @@ const gamesIdWithoutPath = async () => {
|
||||
},
|
||||
});
|
||||
|
||||
const gameExecutableIds: string[] = [];
|
||||
|
||||
for (const game of games) {
|
||||
const has = gameExecutables[game.objectID];
|
||||
|
||||
if (has) {
|
||||
gameExecutableIds.push(game.objectID);
|
||||
}
|
||||
}
|
||||
|
||||
return gameExecutableIds;
|
||||
return games
|
||||
.filter((game) => gameExecutables[game.objectID])
|
||||
.map((game) => game.objectID);
|
||||
};
|
||||
|
||||
const findGamePathByProcess = (
|
||||
|
Loading…
Reference in New Issue
Block a user