Browse Source

chore: update

daiwei 8 months ago
parent
commit
c272550f85
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/runtime-vapor/src/insertionState.ts

+ 2 - 0
packages/runtime-vapor/src/insertionState.ts

@@ -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