mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-15 04:32:13 +00:00
replace Set with Map
This commit is contained in:
parent
5ede782acd
commit
913699e4b6
1 changed files with 7 additions and 1 deletions
|
@ -35,5 +35,11 @@ const steam250Paths = [
|
||||||
export const getSteam250List = async () => {
|
export const getSteam250List = async () => {
|
||||||
const gamesPromises = steam250Paths.map((path) => requestSteam250(path));
|
const gamesPromises = steam250Paths.map((path) => requestSteam250(path));
|
||||||
const gamesList = (await Promise.all(gamesPromises)).flat();
|
const gamesList = (await Promise.all(gamesPromises)).flat();
|
||||||
return [...new Set(gamesList)];
|
|
||||||
|
const gamesMap = gamesList.reduce((map, item) => {
|
||||||
|
map.set(item.objectID, item);
|
||||||
|
return map;
|
||||||
|
}, new Map<string, Steam250Game>());
|
||||||
|
|
||||||
|
return [...gamesMap.values()];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue