From bf2fc2fadf37c0112914527c727bb387ac86d2a4 Mon Sep 17 00:00:00 2001 From: Peter Miller Date: Mon, 20 Nov 2023 09:12:16 -0800 Subject: [PATCH] fix: use set for mentions comparison --- src/components/Note/NoteMentions.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Note/NoteMentions.tsx b/src/components/Note/NoteMentions.tsx index 065fad8a7..7e6ecce39 100644 --- a/src/components/Note/NoteMentions.tsx +++ b/src/components/Note/NoteMentions.tsx @@ -63,7 +63,7 @@ const NoteMentions: FC = ({ }) => { const { deleted, editing, text } = note; - const mentionStrings = mentionableUsers.map((user) => `@${user.value}`); + const mentionStrings = new Set(mentionableUsers.map((user) => `@${user.value}`)); const mentionStyles = () => (