]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: update
authordaiwei <daiwei521@126.com>
Sat, 20 Sep 2025 01:43:52 +0000 (09:43 +0800)
committerdaiwei <daiwei521@126.com>
Sat, 20 Sep 2025 01:43:52 +0000 (09:43 +0800)
packages/runtime-vapor/src/insertionState.ts

index f1e128d42edc451b4d24920e6acf65f106b25639..fc015c219fdfba651472b49a22093fc9ea9794bc 100644 (file)
@@ -134,6 +134,8 @@ function cacheTemplateChildren(parent: InsertionParent) {
   if (!parent.$children) {
     const nodes = parent.childNodes
     const len = nodes.length
+    if (len === 0) return
+
     const children = new Array(len) as ChildItem[]
     for (let i = 0; i < len; i++) {
       const node = nodes[i] as ChildItem