diff --git a/src/components/ContextChat/ContextChatOutputForm.vue b/src/components/ContextChat/ContextChatOutputForm.vue index b2591b48..1db910b8 100644 --- a/src/components/ContextChat/ContextChatOutputForm.vue +++ b/src/components/ContextChat/ContextChatOutputForm.vue @@ -76,7 +76,7 @@ export default { computed: { sources() { try { - return JSON.parse(this.output.sources) + return this.output?.sources?.map(JSON.parse) ?? [] } catch (e) { console.error('Failed to parse sources', e) return []