Skip to content

Commit

Permalink
perf: deep clone slot vnodes on re-render (#6478)
Browse files Browse the repository at this point in the history
avoid unnecessary assignment.
  • Loading branch information
dsonet authored and yyx990803 committed Sep 1, 2017
1 parent 321866a commit 5346361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/vdom/vnode.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export function cloneVNode (vnode: VNode, deep?: boolean): VNode {
cloned.key = vnode.key
cloned.isComment = vnode.isComment
cloned.isCloned = true
if (deep) {
cloned.children = vnode.children && cloneVNodes(vnode.children)
if (deep && vnode.children) {
cloned.children = cloneVNodes(vnode.children)
}
return cloned
}
Expand Down

0 comments on commit 5346361

Please sign in to comment.