diff --git a/webapp/stores/suggestion_store.jsx b/webapp/stores/suggestion_store.jsx index c528f73603..75221421f2 100644 --- a/webapp/stores/suggestion_store.jsx +++ b/webapp/stores/suggestion_store.jsx @@ -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); }