fix: codeblock rendering issue

This commit is contained in:
Timothy J. Baek
2024-05-25 02:47:09 -07:00
parent 42dcf1b08c
commit a6af20e1eb
2 changed files with 55 additions and 54 deletions
@@ -440,8 +440,8 @@
{#if token.type === 'code'}
<CodeBlock
id={`${message.id}-${tokenIdx}`}
lang={token.lang}
code={revertSanitizedResponseContent(token.text)}
lang={token?.lang ?? ''}
code={revertSanitizedResponseContent(token?.text ?? '')}
/>
{:else}
{@html marked.parse(token.raw, {