MCPcopy
hub / github.com/vuejs/core / deepCloneVNode

Function deepCloneVNode

packages/runtime-core/src/vnode.ts:745–751  ·  view source on GitHub ↗

* Dev only, for HMR of hoisted vnodes reused in v-for * https://github.com/vitejs/vite/issues/2022

(vnode: VNode)

Source from the content-addressed store, hash-verified

743 * https://github.com/vitejs/vite/issues/2022
744 */
745function deepCloneVNode(vnode: VNode): VNode {
746 const cloned = cloneVNode(vnode)
747 if (isArray(vnode.children)) {
748 cloned.children = (vnode.children as VNode[]).map(deepCloneVNode)
749 }
750 return cloned
751}
752
753/**
754 * @private

Callers

nothing calls this directly

Calls 2

cloneVNodeFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected