diff --git a/src/lib/components/chat/Artifacts.svelte b/src/lib/components/chat/Artifacts.svelte index bcf12aa68..04dd9f264 100644 --- a/src/lib/components/chat/Artifacts.svelte +++ b/src/lib/components/chat/Artifacts.svelte @@ -32,7 +32,7 @@ const getContents = () => { contents = []; messages.forEach((message) => { - if (message.content) { + if (message?.content) { const codeBlockContents = message.content.match(/```[\s\S]*?```/g); let codeBlocks = [];