mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 12:24:25 +02:00
Merge pull request #1691 from sharelatex/cmg-tag-duplicates
Stop duplicate tags being created GitOrigin-RevId: 7e2b4228dc6ec7ebc2a4e30e18a6d5dcbd5cb6c8
This commit is contained in:
committed by
sharelatex
parent
9e63211a17
commit
144d936141
@@ -403,8 +403,14 @@ define(['base'], function(App) {
|
||||
})
|
||||
|
||||
return modalInstance.result.then(function(tag) {
|
||||
$scope.tags.push(tag)
|
||||
return $scope.addSelectedProjectsToTag(tag)
|
||||
const tagIsDuplicate = $scope.tags.find(function(existingTag) {
|
||||
return tag.name === existingTag.name
|
||||
})
|
||||
|
||||
if (!tagIsDuplicate) {
|
||||
$scope.tags.push(tag)
|
||||
return $scope.addSelectedProjectsToTag(tag)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user