mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-25 04:40:15 +01:00
fix: only set artifact if there is content
This commit is contained in:
parent
66d5a1a368
commit
8e1807d02b
1 changed files with 4 additions and 0 deletions
|
|
@ -56,6 +56,10 @@ export function Artifact({
|
|||
const updateArtifact = useCallback(() => {
|
||||
const content = extractContent(props.children);
|
||||
|
||||
if (!content || content.trim() === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
const title = props.title ?? 'Untitled Artifact';
|
||||
const type = props.type ?? 'unknown';
|
||||
const identifier = props.identifier ?? 'no-identifier';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue