diff --git a/assets/chat/js/emotes.js b/assets/chat/js/emotes.js index 0b9aeaa9..32da01a0 100644 --- a/assets/chat/js/emotes.js +++ b/assets/chat/js/emotes.js @@ -41,6 +41,10 @@ export default class EmoteService { return this.emotes.filter((e) => e.twitch).map((e) => e.prefix); } + hasEmote(emote) { + return this.emotesMapped.has(emote); + } + getEmote(emote) { return this.emotesMapped.get(emote); } diff --git a/assets/chat/js/menus/ChatEmoteMenu.js b/assets/chat/js/menus/ChatEmoteMenu.js index 81ecebb1..dba61a99 100644 --- a/assets/chat/js/menus/ChatEmoteMenu.js +++ b/assets/chat/js/menus/ChatEmoteMenu.js @@ -38,7 +38,9 @@ export default class ChatEmoteMenu extends ChatMenu { } buildFavoriteEmoteMenu() { - const favoriteEmotes = [...this.chat.favoriteemotes]; + const favoriteEmotes = [...this.chat.favoriteemotes].filter((e) => + this.chat.emoteService.hasEmote(e), + ); if (favoriteEmotes.length === 0) { this.favoriteEmoteMenuContent.html(`
Favorite Emotes