diff --git a/package.json b/package.json index 2827619c..414a79d7 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.6.0", + "version": "4.6.1", "description": "FrankerFaceZ is a Twitch enhancement suite.", "license": "Apache-2.0", "scripts": { diff --git a/src/sites/twitch-twilight/modules/chat/input.jsx b/src/sites/twitch-twilight/modules/chat/input.jsx index 1db0b998..92d36ee0 100644 --- a/src/sites/twitch-twilight/modules/chat/input.jsx +++ b/src/sites/twitch-twilight/modules/chat/input.jsx @@ -212,17 +212,21 @@ export default class Input extends Module { inst.getMatchedEmotes = function(input) { const limitResults = t.chat.context.get('chat.tab-complete.limit-results'); - let results = t.getTwitchEmoteSuggestions(input, this); + if ( limitResults && results.length >= 25 ) + return results.slice(0, 25); if ( t.chat.context.get('chat.tab-complete.ffz-emotes') ) { const ffz_emotes = t.getEmoteSuggestions(input, this); if ( Array.isArray(ffz_emotes) && ffz_emotes.length ) - results = Array.isArray(results) ? results.concat(ffz_emotes) : ffz_emotes; + results = results.concat(ffz_emotes); } + if ( limitResults && results.length >= 25 ) + return results.slice(0, 25); + if ( ! t.chat.context.get('chat.tab-complete.emoji') ) - return limitResults && results.length > 25 ? results.slice(0, 25) : results; + return results; const emoji = t.getEmojiSuggestions(input, this); if ( Array.isArray(emoji) && emoji.length )