From 8256a89162c2280a89d0d090d5dad526b8573852 Mon Sep 17 00:00:00 2001 From: Dev Aggarwal Date: Wed, 9 Oct 2024 23:01:35 +0530 Subject: [PATCH] fix problem with rendering void elements --- app/renderer.tsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/renderer.tsx b/app/renderer.tsx index da8dee5..5bd651e 100644 --- a/app/renderer.tsx +++ b/app/renderer.tsx @@ -401,15 +401,19 @@ function RenderedTreeNode({ ); case "tag": { const { __reactjsxelement, ...args } = props; - return ( - <__reactjsxelement {...args}> - - - ); + if (children.length) { + return ( + <__reactjsxelement {...args}> + + + ); + } else { + return <__reactjsxelement {...args} />; + } } case "countdown-timer": { return (