restore for...of

This commit is contained in:
Matteo Pagliazzi
2019-10-09 20:19:31 +02:00
parent e0e9811ab6
commit 415f28995d
5 changed files with 12 additions and 12 deletions

View File

@@ -34,11 +34,11 @@ export default function allocateBulk (user, req = {}) {
throw new NotAuthorized(i18n.t('notEnoughAttrPoints', req.language));
}
Object.entries(stats).forEach(([stat, value]) => {
for (const [stat, value] of Object.entries(stats)) {
user.stats[stat] += value;
user.stats.points -= value;
if (stat === 'int') user.stats.mp += value;
});
}
return [
user.stats,