mirror of https://github.com/vector-im/riot-web
Apply code review suggestion
Signed-off-by: Robin Townsend <robin@robin.town>pull/21833/head
parent
aefdac1115
commit
1d1d93ed14
|
@ -80,7 +80,7 @@ function mightContainEmoji(str: string): boolean {
|
||||||
*/
|
*/
|
||||||
export function unicodeToShortcode(char: string): string {
|
export function unicodeToShortcode(char: string): string {
|
||||||
const shortcodes = getEmojiFromUnicode(char)?.shortcodes;
|
const shortcodes = getEmojiFromUnicode(char)?.shortcodes;
|
||||||
return shortcodes && shortcodes.length > 0 ? `:${shortcodes[0]}:` : '';
|
return shortcodes?.length ? `:${shortcodes[0]}:` : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function processHtmlForSending(html: string): string {
|
export function processHtmlForSending(html: string): string {
|
||||||
|
|
Loading…
Reference in New Issue