mirror of
https://github.com/The-Low-Code-Foundation/OpenNoodl.git
synced 2026-01-10 14:22:53 +01:00
fix(runtime): Column node added a div with empty Repeater (#45)
When the Column node only had an empty Repeater child, there was an empty HTML element.
This commit is contained in:
committed by
Richard Osborne
parent
1d295c9462
commit
22058e9016
@@ -115,7 +115,10 @@ export function Columns(props: ColumnsProps) {
|
||||
|
||||
// ForEachCompoent breaks the layout but is needed to send onMount/onUnmount
|
||||
if (!Array.isArray(props.children)) {
|
||||
children = [props.children];
|
||||
// @ts-expect-error props.children.type is any
|
||||
if (props.children.type !== ForEachComponent) {
|
||||
children = [props.children]
|
||||
}
|
||||
} else {
|
||||
children = props.children.filter((child) => child.type !== ForEachComponent);
|
||||
forEachComponent = props.children.find((child) => child.type === ForEachComponent);
|
||||
|
||||
Reference in New Issue
Block a user