You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Fix error when hovering over non-emoji reactions
Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
@@ -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 && shortcodes.length > 0 ? `:${shortcodes[0]}:` : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function processHtmlForSending(html: string): string {
|
export function processHtmlForSending(html: string): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user