fix: only set artifact if there is content

This commit is contained in:
Danny Avila 2024-08-23 16:38:14 -04:00
parent 66d5a1a368
commit 8e1807d02b

View file

@ -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';