Skip to content

Commit

Permalink
fix(TransitionGroup): ignore comment node when warn (fix#869) (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysj16 authored Mar 24, 2020
1 parent 4cb3c5c commit 0dba5d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/runtime-dom/src/components/TransitionGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from './Transition'
import {
Fragment,
Comment,
VNode,
warn,
resolveTransitionHooks,
Expand Down Expand Up @@ -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.`)
}
}
Expand Down

0 comments on commit 0dba5d4

Please sign in to comment.