mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
restore for...of
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user