From c4fd04efb642b42b5829e25b4fc5d8b389fff8de Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Tue, 4 Apr 2017 00:22:09 -0400
Subject: Fixed channel autocomplete flickering (#5961)

---
 webapp/stores/suggestion_store.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'webapp/stores/suggestion_store.jsx')

diff --git a/webapp/stores/suggestion_store.jsx b/webapp/stores/suggestion_store.jsx
index a0cd88370..5a8ea3006 100644
--- a/webapp/stores/suggestion_store.jsx
+++ b/webapp/stores/suggestion_store.jsx
@@ -227,8 +227,8 @@ class SuggestionStore extends EventEmitter {
 
         switch (type) {
         case ActionTypes.SUGGESTION_PRETEXT_CHANGED:
-            // Clear the suggestions if the pretext is empty or has whitespace
-            if (other.pretext === '' || (/\s/g.test(other.pretext))) {
+            // Clear the suggestions if the pretext is empty or ends with whitespace
+            if (other.pretext === '') {
                 this.clearSuggestions(id);
             }
 
-- 
cgit v1.2.3-1-g7c22

