* Dev only, for HMR of hoisted vnodes reused in v-for * https://github.com/vitejs/vite/issues/2022
(vnode: VNode)
| 743 | * https://github.com/vitejs/vite/issues/2022 |
| 744 | */ |
| 745 | function 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 |
nothing calls this directly
no test coverage detected