diff options
author | George Goldberg <george@gberg.me> | 2017-08-08 13:54:23 +0100 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-08-08 08:54:23 -0400 |
commit | 7683e751ab7c8dee28e8ec8f2dcf3edd1048fe29 (patch) | |
tree | 16f6b3bca2238459ca165bea5d321b092ff3fb0b /webapp | |
parent | dcaed2c8e3380a433e5b3b1a9a91edbd1de4be2f (diff) | |
download | chat-7683e751ab7c8dee28e8ec8f2dcf3edd1048fe29.tar.gz chat-7683e751ab7c8dee28e8ec8f2dcf3edd1048fe29.tar.bz2 chat-7683e751ab7c8dee28e8ec8f2dcf3edd1048fe29.zip |
PLT-7311 Don't allow empty search in searchbar. (#7133)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/search_bar.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
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, |