Changed CommandProvider to only set the matched pretext if it actually matches anything

Этот коммит содержится в:
hmhealey
2016-02-05 09:47:43 -05:00
родитель 8e79f12f3c
Коммит e6a7594d70
3 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@@ -2,7 +2,6 @@
// See License.txt for license information.
import * as AsyncClient from '../../utils/async_client.jsx';
import SuggestionStore from '../../stores/suggestion_store.jsx';
class CommandSuggestion extends React.Component {
render() {
@@ -38,8 +37,6 @@ CommandSuggestion.propTypes = {
export default class CommandProvider {
handlePretextChanged(suggestionId, pretext) {
if (pretext.startsWith('/')) {
SuggestionStore.setMatchedPretext(suggestionId, pretext);
AsyncClient.getSuggestedCommands(pretext, suggestionId, CommandSuggestion);
}
}