Skip to content

Commit

Permalink
fix: Field - hide paragraph when no children
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed May 6, 2024
1 parent 5ff33f8 commit 33865d1
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions apps/web/src/lib/extensions/component-renderer.tsx
Expand Up @@ -272,18 +272,20 @@ const ComponentRenderer: Component<ComponentRendererProps> = (props) => {
view={props.view}
{...componentProps}
>
<For each={props.view.slot}>
{(view) => {
return (
<ComponentRenderer
view={view}
spec={props.spec}
contentEditable={props.contentEditable}
components={props.components}
/>
);
}}
</For>
{props.view.slot?.length && (
<For each={props.view.slot}>
{(view) => {
return (
<ComponentRenderer
view={view}
spec={props.spec}
contentEditable={props.contentEditable}
components={props.components}
/>
);
}}
</For>
)}
</Dynamic>
);
};
Expand Down

0 comments on commit 33865d1

Please sign in to comment.