mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-7311 Don't allow empty search in searchbar. (#7133)
This commit is contained in:
committed by
Joram Wilander
parent
dcaed2c8e3
commit
7683e751ab
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user