From e6a7594d70dfde30e3dbb36d45e5d1458883553f Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 5 Feb 2016 09:47:43 -0500 Subject: Changed CommandProvider to only set the matched pretext if it actually matches anything --- web/react/stores/suggestion_store.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/react/stores') diff --git a/web/react/stores/suggestion_store.jsx b/web/react/stores/suggestion_store.jsx index 9cd566c22..dd5c107e0 100644 --- a/web/react/stores/suggestion_store.jsx +++ b/web/react/stores/suggestion_store.jsx @@ -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); -- cgit v1.2.3-1-g7c22