Fix reaction_deck api structure

This commit is contained in:
KMY 2023-05-26 17:26:50 +09:00
parent 3f9a75c72f
commit f382b16fde
3 changed files with 55 additions and 7 deletions

View file

@ -13,7 +13,7 @@ import emojify from 'mastodon/features/emoji/emoji';
import { autoPlayGif } from 'mastodon/initial_state';
const MapStateToProps = (state, { emojiId, emojiMap }) => ({
emoji: (state.get('reaction_deck', ImmutableList()).toArray().find(em => em.get('id') === emojiId) || ImmutableMap({ emoji: '' })).get('emoji'),
emoji: (state.get('reaction_deck', ImmutableList()).toArray().find(em => em.get('id') === emojiId) || ImmutableMap({ emoji: { shortcode: '' } })).getIn(['emoji', 'shortcode']),
emojiMap,
});