From 08822def53059550e168bef93fbdc0bd7d53e741 Mon Sep 17 00:00:00 2001 From: prixone Date: Thu, 20 Apr 2017 16:19:31 -0300 Subject: [PR5878] Update to improve maintability [PR5938 required]... (#5940) For this update to properly work [PR 5938](https://github.com/mattermost/platform/pull/5938) is required! --- webapp/components/search_bar.jsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'webapp') diff --git a/webapp/components/search_bar.jsx b/webapp/components/search_bar.jsx index 0766ee3b7..527f965c7 100644 --- a/webapp/components/search_bar.jsx +++ b/webapp/components/search_bar.jsx @@ -74,17 +74,8 @@ export default class SearchBar extends React.Component { if (!Utils.areObjectsEqual(newState, this.state)) { this.setState(newState); } - if (doSearch && newState && newState.searchTerm.length) { - performSearch( - newState.searchTerm, - isMentionSearch, - () => { - this.handleSearchOnSuccess(); - }, - () => { - this.handleSearchOnError(); - } - ); + if (doSearch) { + this.handleSearch(newState.searchTerm, isMentionSearch); } } } -- cgit v1.2.3-1-g7c22