diff --git a/src/lib/components/chat/Messages/RateComment.svelte b/src/lib/components/chat/Messages/RateComment.svelte index 895143e02..78eddecd9 100644 --- a/src/lib/components/chat/Messages/RateComment.svelte +++ b/src/lib/components/chat/Messages/RateComment.svelte @@ -46,8 +46,8 @@ } onMount(() => { - selectedReason = message.annotation.reason; - comment = message.annotation.comment; + selectedReason = message?.annotation?.reason ?? ''; + comment = message?.annotation?.comment ?? ''; loadReasons(); }); diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 281f7671f..a10f2fa62 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -876,8 +876,8 @@