mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-02 16:23:48 +03:00
refactor: Set descontruction to Set foreach
This commit is contained in:
parent
1ffb9828f7
commit
431ad2ff2c
@ -63,19 +63,19 @@ const findGamePathByProcess = (
|
|||||||
|
|
||||||
if (!exe) continue;
|
if (!exe) continue;
|
||||||
|
|
||||||
const hasProcess = processMap.get(exe);
|
const pathSet = processMap.get(exe);
|
||||||
|
|
||||||
if (hasProcess) {
|
if (pathSet) {
|
||||||
const executableName = executable.name.replace(/\//g, "\\");
|
const executableName = executable.name.replace(/\//g, "\\");
|
||||||
|
|
||||||
for (const path of [...hasProcess]) {
|
pathSet.forEach((path) => {
|
||||||
if (path.toLowerCase().endsWith(executableName)) {
|
if (path.toLowerCase().endsWith(executableName)) {
|
||||||
gameRepository.update(
|
gameRepository.update(
|
||||||
{ objectID: id, shop: "steam" },
|
{ objectID: id, shop: "steam" },
|
||||||
{ executablePath: path }
|
{ executablePath: path }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user