summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-12-30 19:01:01 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-12-30 19:01:01 +0900
commit2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0 (patch)
tree3445c67481b71462f3fa6d0297e4d87b32148a9e /packages/frontend/src/scripts
parent:art: (diff)
downloadsharkey-2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0.tar.gz
sharkey-2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0.tar.bz2
sharkey-2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0.zip
ReactionsViewerが消えることがある問題を修正
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/use-note-capture.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/use-note-capture.ts b/packages/frontend/src/scripts/use-note-capture.ts
index e6bdb345c4..389ee12561 100644
--- a/packages/frontend/src/scripts/use-note-capture.ts
+++ b/packages/frontend/src/scripts/use-note-capture.ts
@@ -45,6 +45,7 @@ export function useNoteCapture(props: {
const currentCount = (note.value.reactions || {})[reaction] || 0;
note.value.reactions[reaction] = Math.max(0, currentCount - 1);
+ if (note.value.reactions[reaction] === 0) delete note.value.reactions[reaction];
if ($i && (body.userId === $i.id)) {
note.value.myReaction = null;