Merge pull request #2966 from overleaf/cmg-jpa-tags-update-propagation

Remove tag in place instead of replacing array

GitOrigin-RevId: 779577e8981e37508d20364903a843795c36dffe
This commit is contained in:
Jakob Ackermann 2020-07-07 14:54:50 +02:00 committed by Copybot
parent 48b138f227
commit 6050de114e

View file

@ -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)
})
}