]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(TransitionGroup): ignore comment node when warn (fix#869) (#875)
authorysj16 <504427021@qq.com>
Tue, 24 Mar 2020 16:09:42 +0000 (00:09 +0800)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 16:09:42 +0000 (12:09 -0400)
packages/runtime-dom/src/components/TransitionGroup.ts

index 0cefb8f097b653d4ea5e566a08eb8956114a676f..331b5f1989948567b5c1966d45288d4a8da8976f 100644 (file)
@@ -9,6 +9,7 @@ import {
 } from './Transition'
 import {
   Fragment,
+  Comment,
   VNode,
   warn,
   resolveTransitionHooks,
@@ -108,7 +109,7 @@ const TransitionGroupImpl = {
             child,
             resolveTransitionHooks(child, cssTransitionProps, state, instance)
           )
-        } else if (__DEV__) {
+        } else if (__DEV__ && child.type !== Comment) {
           warn(`<TransitionGroup> children must be keyed.`)
         }
       }