Skip to content

Commit

Permalink
fix(contextchat): sources are json string in a list (#126)
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky committed Sep 19, 2024
1 parent ccddd9a commit b561be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ContextChat/ContextChatOutputForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 []
Expand Down

0 comments on commit b561be8

Please sign in to comment.