add await

isekai-main
Barış Soner Uşaklı 2 years ago
parent 7ab05f5dfd
commit 3066519028

@ -124,10 +124,9 @@ module.exports = function (Posts) {
})); }));
orphans = orphans.filter(Boolean); orphans = orphans.filter(Boolean);
// Note: no await. Deletion not guaranteed by method end. await Promise.all(orphans.map(async (relPath) => {
orphans.forEach((relPath) => { await file.delete(_getFullPath(relPath));
file.delete(_getFullPath(relPath)); }));
});
return orphans; return orphans;
}; };

Loading…
Cancel
Save