Fix autocomplete after cache delete (#4623) (#4625)

(cherry picked from commit 9f98b943e7)

Co-authored-by: Shota Gvinepadze <wineson@gmail.com>
This commit is contained in:
Mattermost Build 2020-07-30 21:51:24 +02:00 committed by GitHub
parent 5ee6142142
commit 838a52221f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,7 +51,7 @@ export default class SlashSuggestion extends PureComponent {
};
componentWillReceiveProps(nextProps) {
if ((nextProps.value === this.props.value && nextProps.suggestions === this.props.suggestions) ||
if ((nextProps.value === this.props.value && nextProps.suggestions === this.props.suggestions && nextProps.commands === this.props.commands) ||
nextProps.isSearch || nextProps.value.startsWith('//') || !nextProps.channelId) {
return;
}