Jelajahi Sumber

fix(transitionGroup): fix transition children resolving condition

Evan You 6 tahun lalu
induk
melakukan
f05aeea7ae
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      packages/runtime-dom/src/components/TransitionGroup.ts

+ 2 - 2
packages/runtime-dom/src/components/TransitionGroup.ts

@@ -140,8 +140,8 @@ function getTransitionRawChildren(children: VNode[]): VNode[] {
     if (child.type === Fragment) {
       ret = ret.concat(getTransitionRawChildren(child.children as VNode[]))
     }
-    // comment should be skip, e.g. v-if
-    if (child.type !== Comment) {
+    // comment placeholders should be skipped, e.g. v-if
+    else if (child.type !== Comment) {
       ret.push(child)
     }
   }