mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor: simplify resetGameAchievements by replacing Promise.all with a for loop
This commit is contained in:
parent
52c159fe51
commit
e2f798c627
1 changed files with 3 additions and 5 deletions
|
@ -18,11 +18,9 @@ const resetGameAchievements = async (
|
||||||
const achievementFiles = findAchievementFiles(game);
|
const achievementFiles = findAchievementFiles(game);
|
||||||
|
|
||||||
if (achievementFiles.length) {
|
if (achievementFiles.length) {
|
||||||
await Promise.all(
|
for (const achievementFile of achievementFiles) {
|
||||||
achievementFiles.map(async (achievementFile) => {
|
await fs.promises.rm(achievementFile.filePath);
|
||||||
await fs.promises.rm(achievementFile.filePath, { recursive: true });
|
}
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await gameAchievementRepository.update(
|
await gameAchievementRepository.update(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue