Skip to content

Commit

Permalink
don't crash if match_highlights is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
zotya committed Nov 26, 2024
1 parent 091db2f commit 71af903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ChatBlock/Citation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function Citation({ link, index, value, message }) {
content
) : (
<div>
{document.match_highlights.map((text, i) => (
{document?.match_highlights?.map((text, i) => (
<div key={i} dangerouslySetInnerHTML={{ __html: text }} />
))}
</div>
Expand Down

0 comments on commit 71af903

Please sign in to comment.