From 254cefee1af5fbe12eb03c5246e1ca7f18275bbe Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 21 Oct 2016 11:52:09 -0400 Subject: [PATCH] Clear emoji suggestion list if there no matches (#4290) --- webapp/components/suggestion/emoticon_provider.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/components/suggestion/emoticon_provider.jsx b/webapp/components/suggestion/emoticon_provider.jsx index 2af61ea9ea..c2b6b9a50b 100644 --- a/webapp/components/suggestion/emoticon_provider.jsx +++ b/webapp/components/suggestion/emoticon_provider.jsx @@ -90,8 +90,8 @@ export default class EmoticonProvider { const terms = matched.map((emoticon) => ':' + emoticon.name + ':'); + SuggestionStore.clearSuggestions(suggestionId); if (terms.length > 0) { - SuggestionStore.clearSuggestions(suggestionId); SuggestionStore.addSuggestions(suggestionId, terms, matched, EmoticonSuggestion, text); hasSuggestions = true;