diff --git a/src/ui/component/tagsSearch/view.jsx b/src/ui/component/tagsSearch/view.jsx index 5b8c45186..482ede25b 100644 --- a/src/ui/component/tagsSearch/view.jsx +++ b/src/ui/component/tagsSearch/view.jsx @@ -62,7 +62,8 @@ export default function TagsSearch(props: Props) { setNewTag(''); - tags = tags.split(',').map(newTag => newTag.trim().toLowerCase()); + // Split into individual tags, normalize the tags, and remove duplicates with sets. + tags = [...new Set(tags.split(',').map(newTag => newTag.trim().toLowerCase()))]; tags.forEach(tag => { if (onSelect) { onSelect({ name: tag });