From e6fcefd4d13a1ada5ff32b650381714d1ac3b86c Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 9 Nov 2023 23:41:26 +0200 Subject: [PATCH] Fix adding duplicate tags via bulk menu --- public/scripts/tags.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts/tags.js b/public/scripts/tags.js index 44a84b164..b8bc89abb 100644 --- a/public/scripts/tags.js +++ b/public/scripts/tags.js @@ -10,7 +10,7 @@ import { import { FILTER_TYPES, FilterHelper } from "./filters.js"; import { groupCandidatesFilter, selected_group } from "./group-chats.js"; -import { uuidv4 } from "./utils.js"; +import { onlyUnique, uuidv4 } from "./utils.js"; export { tags, @@ -153,6 +153,7 @@ function addTagToMap(tagId, characterId = null) { } else { tag_map[key].push(tagId); + tag_map[key] = tag_map[key].filter(onlyUnique); } }