mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix autocomplete not clearing suggestions properly (#4276)
This commit is contained in:
@@ -222,7 +222,8 @@ class SuggestionStore extends EventEmitter {
|
||||
|
||||
switch (type) {
|
||||
case ActionTypes.SUGGESTION_PRETEXT_CHANGED:
|
||||
if (other.pretext === '') {
|
||||
// Clear the suggestions if the pretext is empty or has whitespace
|
||||
if (other.pretext === '' || (/\s/g.test(other.pretext))) {
|
||||
this.clearSuggestions(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user