mirror of
https://github.com/fluxscape/fluxscape.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:
@@ -117,7 +117,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