From 0b122f3b43ce2903b78af357b6a6944e61837cd3 Mon Sep 17 00:00:00 2001 From: Lucas F T Hennigen Date: Tue, 31 May 2016 16:55:30 -0300 Subject: [PATCH] fix(tags): Fix tag removal functionality (#7553) Tag removal functionality was broken. Turns out the issue was simply that we weren't removing the tag from the local `task` object, so the tag was removed, but readded upon sync/pressing save. Closes #7412 --- website/client/js/controllers/tasksCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/client/js/controllers/tasksCtrl.js b/website/client/js/controllers/tasksCtrl.js index fb73fa5042..39619a12c2 100644 --- a/website/client/js/controllers/tasksCtrl.js +++ b/website/client/js/controllers/tasksCtrl.js @@ -305,7 +305,7 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N task.tags.push(tagId); } else { Tasks.removeTagFromTask(task._id, tagId); - task.tags.splice(tagIndex, 0); + task.tags.splice(tagIndex, 1); } } }]);