Skip to content

Commit

Permalink
fix: cloneElement should clone children as well
Browse files Browse the repository at this point in the history
  • Loading branch information
littly committed Mar 9, 2018
1 parent 8d3e90a commit 682fe15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nerv/src/clone-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function cloneElement (vnode, props?: object, ...children): any {
newVNode.props.children = _children
} else if (childrenTmp) {
if (isVNode(newVNode)) {
newVNode.children = childrenTmp
newVNode.children = cloneElement(childrenTmp)
}
newVNode.props.children = cloneElement(childrenTmp, childrenTmp.props)
}
Expand Down

0 comments on commit 682fe15

Please sign in to comment.