diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-29 15:04:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-29 15:04:49 +0200 |
commit | 784c88e16d8e0f75c0d27e34f926569607e02044 (patch) | |
tree | c0dbda59af5283d8c2d3358603052e8be0501ab7 /app/javascript/mastodon/components/autosuggest_input.js | |
parent | 2f0820963d957c2e919a1bea6e38b0c2e2070767 (diff) |
Fix emoji autosuggestions (#11442)
Regression from cfb2ed78231758a79af038a964ab7f7b7b35274e
Diffstat (limited to 'app/javascript/mastodon/components/autosuggest_input.js')
-rw-r--r-- | app/javascript/mastodon/components/autosuggest_input.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/javascript/mastodon/components/autosuggest_input.js b/app/javascript/mastodon/components/autosuggest_input.js index 0df8bf64e..6d2035add 100644 --- a/app/javascript/mastodon/components/autosuggest_input.js +++ b/app/javascript/mastodon/components/autosuggest_input.js @@ -168,15 +168,15 @@ export default class AutosuggestInput extends ImmutablePureComponent { const { selectedSuggestion } = this.state; let inner, key; - if (typeof suggestion === 'object' && suggestion.shortcode) { + if (suggestion.type === 'emoji') { inner = <AutosuggestEmoji emoji={suggestion} />; key = suggestion.id; - } else if (typeof suggestion === 'object' && suggestion.name) { + } else if (suggestion.type ==='hashtag') { inner = <AutosuggestHashtag tag={suggestion} />; key = suggestion.name; - } else { - inner = <AutosuggestAccountContainer id={suggestion} />; - key = suggestion; + } else if (suggestion.type === 'account') { + inner = <AutosuggestAccountContainer id={suggestion.id} />; + key = suggestion.id; } return ( |