small fixes

This commit is contained in:
ewwwwwwww
2022-07-05 00:11:24 -07:00
parent 0de246fcae
commit 891ce09443
3 changed files with 1 additions and 7 deletions

View File

@ -29,7 +29,7 @@ export const addCustomToPool = (customEmojis: EmojiMart<CustomEmoji>[]) => {
};
const search = (str: string, { maxResults = 5, custom }: searchOptions = {}, custom_emojis?: any): Emoji[] => {
return index.search(str, maxResults, { suggest: true })
return index.search(str, maxResults)
.flatMap(id => {
if (Number.isInteger(id)) {
const { shortcode, static_url } = custom_emojis.get(id).toJS();