Composer: fix emoji dropdown not working

This commit is contained in:
Alex Gleason 2023-07-20 19:41:37 -05:00
parent ed9df5e529
commit 6acddfebe7
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -644,7 +644,7 @@ interface ComposeSuggestionSelectAction {
const selectComposeSuggestion = (composeId: string, position: number, token: string | null, suggestion: AutoSuggestion, path: Array<string | number>) =>
(dispatch: AppDispatch, getState: () => RootState) => {
let completion, startPosition;
let completion = '', startPosition = position;
if (typeof suggestion === 'object' && suggestion.id) {
completion = isNativeEmoji(suggestion) ? suggestion.native : suggestion.colons;
@ -659,8 +659,6 @@ const selectComposeSuggestion = (composeId: string, position: number, token: str
startPosition = position;
}
if (!startPosition || !completion) return;
const action: ComposeSuggestionSelectAction = {
type: COMPOSE_SUGGESTION_SELECT,
id: composeId,