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 Aug 30, 2017
1 parent f94f064 commit e65e6cd
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 e65e6cd

Please sign in to comment.