Skip to content

Commit

Permalink
Fix: 絵文字リアクションのストリーミングでエラーが発生する問題 (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode authored Apr 1, 2024
1 parent 7b02596 commit 8c399ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/reducers/statuses.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const updateStatusEmojiReaction = (state, emoji_reaction) => {
emoji_reactions = emoji_reactions.filter((er) => er.get('name') !== emoji_reaction.name);
}

const emoji_reactions_count = emoji_reactions.reduce((prev, current) => prev + current.get('account_ids').count(), 0);
const emoji_reactions_count = emoji_reactions.map((er) => Array.from(er.get('account_ids') || [])).reduce((prev, current) => prev + current.length, 0);

return state
.setIn([emoji_reaction.status_id, 'emoji_reactions'], ImmutableList(emoji_reactions))
Expand Down

0 comments on commit 8c399ce

Please sign in to comment.