diff --git a/src/lib/components/chat/Messages/RateComment.svelte b/src/lib/components/chat/Messages/RateComment.svelte index 73261ce66..6bb8cfee2 100644 --- a/src/lib/components/chat/Messages/RateComment.svelte +++ b/src/lib/components/chat/Messages/RateComment.svelte @@ -7,9 +7,8 @@ const dispatch = createEventDispatcher(); - export let messageId = null; - export let show = false; export let message; + export let show = false; let LIKE_REASONS = []; let DISLIKE_REASONS = []; @@ -54,8 +53,10 @@ const submitHandler = () => { console.log('submitHandler'); - message.annotation.reason = selectedReason; - message.annotation.comment = comment; + if (!selectedReason) { + toast.error($i18n.t('Please select a reason')); + return; + } dispatch('submit', { reason: selectedReason, @@ -69,7 +70,7 @@