v3: fix tasks saving and selection for rebirth reroll and reset (server-only)

This commit is contained in:
Matteo Pagliazzi
2016-05-16 12:04:09 +02:00
parent ba1628427e
commit 793ca3b172
4 changed files with 42 additions and 25 deletions

View File

@@ -13,7 +13,6 @@ module.exports = function reset (user, tasks = [], req = {}) {
tasksToRemove.push(task._id);
let i = user.tasksOrder[`${task.type}s`].indexOf(task._id);
if (i !== -1) user.tasksOrder[`${task.type}s`].splice(i, 1);
tasksToRemove.push(task._id);
}
});