Skip to content

Commit

Permalink
chore: render void element
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Nov 9, 2023
1 parent 377b50e commit 720dc11
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/01-react/src/components/Renderer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ export const Renderer = observer((props: RendererProps) => {
return React.createElement(
props.view.tag,
props.view.props,
props.view.children.map((child) => (
<Renderer key={child.id} view={child} />
))
props.view.children.length > 0
? props.view.children.map((child) => (
<Renderer key={child.id} view={child} />
))
: null
);
}

Expand Down

0 comments on commit 720dc11

Please sign in to comment.