Merge pull request #6416 from robintown/non-emoji-reactions

pull/21833/head
Michael Telatynski 2021-07-21 11:30:15 +01:00 committed by GitHub
commit 5a7fe60d0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ function mightContainEmoji(str: string): boolean {
* @return {String} The shortcode (such as :thumbup:) * @return {String} The shortcode (such as :thumbup:)
*/ */
export function unicodeToShortcode(char: string): string { export function unicodeToShortcode(char: string): string {
const shortcodes = getEmojiFromUnicode(char).shortcodes; const shortcodes = getEmojiFromUnicode(char)?.shortcodes;
return shortcodes.length > 0 ? `:${shortcodes[0]}:` : ''; return shortcodes?.length ? `:${shortcodes[0]}:` : '';
} }
export function processHtmlForSending(html: string): string { export function processHtmlForSending(html: string): string {