diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-30 19:01:01 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-30 19:01:01 +0900 |
| commit | 2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0 (patch) | |
| tree | 3445c67481b71462f3fa6d0297e4d87b32148a9e /packages/frontend/src/scripts | |
| parent | :art: (diff) | |
| download | sharkey-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.ts | 1 |
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; |