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 удалений

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

@@ -223,7 +223,9 @@ class SuggestionStore extends EventEmitter {
this.emitSuggestionsChanged(id);
break;
case ActionTypes.SUGGESTION_RECEIVED_SUGGESTIONS:
if (other.matchedPretext === this.getMatchedPretext(id)) {
if (this.getMatchedPretext(id) === '') {
this.setMatchedPretext(id, other.matchedPretext);
// ensure the matched pretext hasn't changed so that we don't receive suggestions for outdated pretext
this.addSuggestions(id, other.terms, other.items, other.component);