EmojiReacts: handle undefined emoji reacts on a status

This commit is contained in:
Alex Gleason 2021-07-04 20:09:17 -05:00
parent fee8ef768b
commit 9840bd315f
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -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) {