fix: list supports multiple children (without container)
This commit is contained in:
parent
6cfc48d2a7
commit
51054786c2
|
@ -30,7 +30,11 @@ export const attachChildren = initialiseOpts => (htmlElement, options) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const contextArray = Array.isArray(context) ? context : [context]
|
||||||
|
|
||||||
const childNodes = []
|
const childNodes = []
|
||||||
|
|
||||||
|
for (let context of contextArray) {
|
||||||
for (let childProps of treeNode.props._children) {
|
for (let childProps of treeNode.props._children) {
|
||||||
const { componentName, libName } = splitName(childProps._component)
|
const { componentName, libName } = splitName(childProps._component)
|
||||||
|
|
||||||
|
@ -53,11 +57,6 @@ export const attachChildren = initialiseOpts => (htmlElement, options) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Array.isArray(context)) {
|
|
||||||
for (let singleCtx of context) {
|
|
||||||
prepareNodes(singleCtx)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
prepareNodes(context)
|
prepareNodes(context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue