[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!
This commit is contained in:
prixone
2017-04-20 16:19:31 -03:00
committed by Joram Wilander
parent 430e93dfc1
commit 08822def53

View File

@@ -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);
}
}
}