From 995ae0d250f1adaebb09797836ca16ba2091ab1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Miko=C5=82ajczyk?= Date: Sun, 25 May 2025 14:54:46 +0200 Subject: [PATCH] pl-fe: fix announcement reactions optimistic response MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- packages/pl-fe/src/queries/announcements/use-announcements.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pl-fe/src/queries/announcements/use-announcements.ts b/packages/pl-fe/src/queries/announcements/use-announcements.ts index a5e64dbd8..57559f244 100644 --- a/packages/pl-fe/src/queries/announcements/use-announcements.ts +++ b/packages/pl-fe/src/queries/announcements/use-announcements.ts @@ -15,7 +15,7 @@ const updateReactions = (reactions: AnnouncementReaction[], name: string, count: const idx = reactions.findIndex(reaction => reaction.name === name); if (idx > -1) { - reactions = reactions.map(reaction => reaction.name === name ? updateReaction(reaction, count, me, overwrite) : reaction); + return reactions.map(reaction => reaction.name === name ? updateReaction(reaction, count, me, overwrite) : reaction); } return [...reactions, updateReaction(v.parse(announcementReactionSchema, { name }), count, me, overwrite)];