fix access to user.tasksOrder

This commit is contained in:
Matteo Pagliazzi
2016-01-14 20:55:13 +01:00
parent 5206469e90
commit 7d5a7503cb
2 changed files with 2 additions and 2 deletions

View File

@@ -838,7 +838,7 @@ api.removeTagFromTask = {
// Remove a task from (user|challenge).tasksOrder
function _removeTaskTasksOrder (userOrChallenge, taskId, taskType) {
let list = userOrChallenge.tasksOrder[taskType];
let list = userOrChallenge.tasksOrder[`${taskType}s`];
let index = list.indexOf(taskId);
if (index !== -1) list.splice(index, 1);