summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorprixone <prixone@users.noreply.github.com>2017-04-20 16:19:31 -0300
committerJoram Wilander <jwawilander@gmail.com>2017-04-20 15:19:31 -0400
commit08822def53059550e168bef93fbdc0bd7d53e741 (patch)
tree35fb9df702b515a4c58b8f9224d5cd09b6fcc3f8 /webapp
parent430e93dfc153c56af95a252adcf00470de272e78 (diff)
downloadchat-08822def53059550e168bef93fbdc0bd7d53e741.tar.gz
chat-08822def53059550e168bef93fbdc0bd7d53e741.tar.bz2
chat-08822def53059550e168bef93fbdc0bd7d53e741.zip
[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!
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/search_bar.jsx13
1 files changed, 2 insertions, 11 deletions
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);
}
}
}