Fix (undefined)
This commit is contained in:
parent
e23549c677
commit
dedd7feea5
|
|
@ -49,7 +49,7 @@ const emit = defineEmits(['input']);
|
|||
|
||||
const containsEmoji = (text: string) => {
|
||||
const lastCharacter = Array.from(text)[Array.from(text).length - 1];
|
||||
if (lastCharacter.charCodeAt(0)> 55000) //fix for the hand symbol 🖐️
|
||||
if (lastCharacter && lastCharacter.charCodeAt(0)> 55000) //fix for the hand symbol 🖐️
|
||||
return true
|
||||
const emojiRegex = /\p{Emoji}/u;
|
||||
return emojiRegex.test(lastCharacter);
|
||||
|
|
|
|||
Loading…
Reference in New Issue