Skip to content

Commit

Permalink
fix problem with rendering void elements
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Oct 9, 2024
1 parent 713434d commit 8256a89
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions app/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,19 @@ function RenderedTreeNode({
);
case "tag": {
const { __reactjsxelement, ...args } = props;
return (
<__reactjsxelement {...args}>
<RenderedChildren
children={children}
onChange={onChange}
state={state}
/>
</__reactjsxelement>
);
if (children.length) {
return (
<__reactjsxelement {...args}>
<RenderedChildren
children={children}
onChange={onChange}
state={state}
/>
</__reactjsxelement>
);
} else {
return <__reactjsxelement {...args} />;
}
}
case "countdown-timer": {
return (
Expand Down

0 comments on commit 8256a89

Please sign in to comment.