kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
EmojiReacts: handle undefined emoji reacts on a status
rodzic
fee8ef768b
commit
9840bd315f
|
@ -22,7 +22,7 @@ export const mergeEmoji = emojiReacts => (
|
|||
emojiReacts // TODO: Merge similar emoji
|
||||
);
|
||||
|
||||
export const mergeEmojiFavourites = (emojiReacts, favouritesCount, favourited) => {
|
||||
export const mergeEmojiFavourites = (emojiReacts = ImmutableList(), favouritesCount, favourited) => {
|
||||
if (!favouritesCount) return emojiReacts;
|
||||
const likeIndex = emojiReacts.findIndex(emojiReact => emojiReact.get('name') === '👍');
|
||||
if (likeIndex > -1) {
|
||||
|
|
Ładowanie…
Reference in New Issue