Composer: fix emoji dropdown not working
This commit is contained in:
parent
ed9df5e529
commit
6acddfebe7
1 changed files with 1 additions and 3 deletions
|
@ -644,7 +644,7 @@ interface ComposeSuggestionSelectAction {
|
||||||
|
|
||||||
const selectComposeSuggestion = (composeId: string, position: number, token: string | null, suggestion: AutoSuggestion, path: Array<string | number>) =>
|
const selectComposeSuggestion = (composeId: string, position: number, token: string | null, suggestion: AutoSuggestion, path: Array<string | number>) =>
|
||||||
(dispatch: AppDispatch, getState: () => RootState) => {
|
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||||
let completion, startPosition;
|
let completion = '', startPosition = position;
|
||||||
|
|
||||||
if (typeof suggestion === 'object' && suggestion.id) {
|
if (typeof suggestion === 'object' && suggestion.id) {
|
||||||
completion = isNativeEmoji(suggestion) ? suggestion.native : suggestion.colons;
|
completion = isNativeEmoji(suggestion) ? suggestion.native : suggestion.colons;
|
||||||
|
@ -659,8 +659,6 @@ const selectComposeSuggestion = (composeId: string, position: number, token: str
|
||||||
startPosition = position;
|
startPosition = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!startPosition || !completion) return;
|
|
||||||
|
|
||||||
const action: ComposeSuggestionSelectAction = {
|
const action: ComposeSuggestionSelectAction = {
|
||||||
type: COMPOSE_SUGGESTION_SELECT,
|
type: COMPOSE_SUGGESTION_SELECT,
|
||||||
id: composeId,
|
id: composeId,
|
||||||
|
|
Loading…
Reference in a new issue