From 6050de114ea32927c9c59ba62b07ef53fe3501df Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 7 Jul 2020 14:54:50 +0200 Subject: [PATCH] Merge pull request #2966 from overleaf/cmg-jpa-tags-update-propagation Remove tag in place instead of replacing array GitOrigin-RevId: 779577e8981e37508d20364903a843795c36dffe --- .../web/frontend/js/main/project-list/tag-controllers.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/frontend/js/main/project-list/tag-controllers.js b/services/web/frontend/js/main/project-list/tag-controllers.js index f7b317e79e..c049a7b5a8 100644 --- a/services/web/frontend/js/main/project-list/tag-controllers.js +++ b/services/web/frontend/js/main/project-list/tag-controllers.js @@ -63,8 +63,9 @@ App.controller('TagListController', function($scope, $modal) { project.tags.splice(index, 1) } } - // Remove tag - $scope.tags = $scope.tags.filter(t => t !== tag) + + // Remove tag in place to update the state everywhere + $scope.tags.splice($scope.tags.indexOf(tag), 1) }) }