From dedd7feea5b0c01810fdb347d0a3b65792c98bfb Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Thu, 16 May 2024 00:27:16 +0200 Subject: [PATCH] Fix (undefined) --- .../components/content-blocks/assignment/SubmissionInput.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/content-blocks/assignment/SubmissionInput.vue b/client/src/components/content-blocks/assignment/SubmissionInput.vue index 489b151e..658f09e1 100644 --- a/client/src/components/content-blocks/assignment/SubmissionInput.vue +++ b/client/src/components/content-blocks/assignment/SubmissionInput.vue @@ -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);