Skip to content

Commit

Permalink
perf: deep clone slot vnodes on re-render (vuejs#6478)
Browse files Browse the repository at this point in the history
avoid unnecessary assignment.
  • Loading branch information
dsonet authored and hefeng committed Jan 25, 2019
1 parent 916ebf7 commit 8864bcf
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 8864bcf

Please sign in to comment.