Skip to content

Commit

Permalink
Fixed @ not working on latest build due to... (#5878)
Browse files Browse the repository at this point in the history
* Fixed @ not working on latest build due to...

On latest build the @ shortcut to search for mentions was not working due to missing parameters on the onListenerChange method, due to changes done previously to post_action and search_bar that were not made to the onListenerChange method.

* Update search_bar.jsx

added fix for when no notification options for mentions is defined by the user...
  • Loading branch information
prixone authored and crspeller committed Mar 31, 2017
1 parent bd5b6f1 commit fa40bfb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions webapp/components/search_bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,17 @@ export default class SearchBar extends React.Component {
if (!Utils.areObjectsEqual(newState, this.state)) {
this.setState(newState);
}
if (doSearch) {
this.performSearch(newState.searchTerm, isMentionSearch);
if (doSearch && newState && newState.searchTerm.length) {
performSearch(
newState.searchTerm,
isMentionSearch,
() => {
this.handleSearchOnSuccess();
},
() => {
this.handleSearchOnError();
}
);
}
}
}
Expand Down

0 comments on commit fa40bfb

Please sign in to comment.