Skip to content

Commit d36ca4d

Browse files
committed
fix(runtime-core): clone root vnode before inheriting directives
1 parent 9ecee16 commit d36ca4d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: packages/runtime-core/src/componentRenderUtils.ts

+2
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ export function renderComponentRoot(
215215
`The directives will not function as intended.`
216216
)
217217
}
218+
// clone before mutating since the root may be a hoisted vnode
219+
root = cloneVNode(root)
218220
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs
219221
}
220222
// inherit transition data

0 commit comments

Comments
 (0)