From 7683e751ab7c8dee28e8ec8f2dcf3edd1048fe29 Mon Sep 17 00:00:00 2001
From: George Goldberg <george@gberg.me>
Date: Tue, 8 Aug 2017 13:54:23 +0100
Subject: PLT-7311 Don't allow empty search in searchbar. (#7133)

---
 webapp/components/search_bar.jsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'webapp/components/search_bar.jsx')

diff --git a/webapp/components/search_bar.jsx b/webapp/components/search_bar.jsx
index f2fed25ca..581fe0536 100644
--- a/webapp/components/search_bar.jsx
+++ b/webapp/components/search_bar.jsx
@@ -173,6 +173,10 @@ export default class SearchBar extends React.Component {
         e.preventDefault();
         const terms = this.state.searchTerm.trim();
 
+        if (terms.length === 0) {
+            return;
+        }
+
         AppDispatcher.handleServerAction({
             type: ActionTypes.RECEIVED_SEARCH_TERM,
             term: terms,
-- 
cgit v1.2.3-1-g7c22

