diff --git a/index.js b/index.js index cfe54f3..f5fdba1 100644 --- a/index.js +++ b/index.js @@ -307,12 +307,12 @@ async function updateProxy(firstRun) { ); const fd = await fs.open(`${mapDir}/${file}.map`, 'w+'); - files[file].forEach(map => { + for (const map of files[file]) { if (Array.isArray(map)) - fs.write(fd, `${map[0]} ${map[1]}\n`); + await fs.write(fd, `${map[0]} ${map[1]}\n`); else - fs.write(fd, `${map}\n`); - }); + await fs.write(fd, `${map}\n`); + } await fs.close(fd); }