Skip to content

Commit

Permalink
fix: check for undefined answer.explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
martapanc committed Aug 23, 2023
1 parent 14dc331 commit 47a92e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/molecules/RandomFacts/QuizAnswers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const QuizAnswers = ({
<span>{answer.headline}</span>
</div>
<div className='rounded bg-blue-100 px-3 py-2 text-xs dark:bg-blue-950'>
<ReactMarkdown>{answer.explanation}</ReactMarkdown>
{answer.explanation && (
<ReactMarkdown>{answer.explanation}</ReactMarkdown>
)}
</div>
</li>
))}
Expand Down

0 comments on commit 47a92e3

Please sign in to comment.