Fix autocomplete not clearing suggestions properly (#4276)

This commit is contained in:
Joram Wilander
2016-10-20 09:13:09 -04:00
committed by GitHub
parent 530b5f5011
commit 86aa979310

View File

@@ -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);
}