Skip to content

Commit 5346361

Browse files
dsonetyyx990803
authored andcommittedSep 1, 2017
perf: deep clone slot vnodes on re-render (#6478)
avoid unnecessary assignment.
1 parent 321866a commit 5346361

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/core/vdom/vnode.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ export function cloneVNode (vnode: VNode, deep?: boolean): VNode {
9595
cloned.key = vnode.key
9696
cloned.isComment = vnode.isComment
9797
cloned.isCloned = true
98-
if (deep) {
99-
cloned.children = vnode.children && cloneVNodes(vnode.children)
98+
if (deep && vnode.children) {
99+
cloned.children = cloneVNodes(vnode.children)
100100
}
101101
return cloned
102102
}

0 commit comments

Comments
 (0)
Please sign in to comment.