From 8e1807d02b29aad462eb7fd8e4fdb9bddf554015 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Fri, 23 Aug 2024 16:38:14 -0400 Subject: [PATCH] fix: only set artifact if there is content --- client/src/components/Artifacts/Artifact.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/components/Artifacts/Artifact.tsx b/client/src/components/Artifacts/Artifact.tsx index 45e017e207..6ece65fe81 100644 --- a/client/src/components/Artifacts/Artifact.tsx +++ b/client/src/components/Artifacts/Artifact.tsx @@ -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';