mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 05:24:55 +03:00
refactor: simplify resetGameAchievements by replacing Promise.all with a for loop
This commit is contained in:
parent
52c159fe51
commit
e2f798c627
@ -18,11 +18,9 @@ const resetGameAchievements = async (
|
||||
const achievementFiles = findAchievementFiles(game);
|
||||
|
||||
if (achievementFiles.length) {
|
||||
await Promise.all(
|
||||
achievementFiles.map(async (achievementFile) => {
|
||||
await fs.promises.rm(achievementFile.filePath, { recursive: true });
|
||||
})
|
||||
);
|
||||
for (const achievementFile of achievementFiles) {
|
||||
await fs.promises.rm(achievementFile.filePath);
|
||||
}
|
||||
}
|
||||
|
||||
await gameAchievementRepository.update(
|
||||
|
Loading…
Reference in New Issue
Block a user