diff --git a/packages/runtime-core/src/componentRenderUtils.ts b/packages/runtime-core/src/componentRenderUtils.ts index ce03b4f6..8e338c31 100644 --- a/packages/runtime-core/src/componentRenderUtils.ts +++ b/packages/runtime-core/src/componentRenderUtils.ts @@ -215,6 +215,8 @@ export function renderComponentRoot( `The directives will not function as intended.` ) } + // clone before mutating since the root may be a hoisted vnode + root = cloneVNode(root) root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs } // inherit transition data