Skip to content

Commit 0dba5d4

Browse files
authored
fix(TransitionGroup): ignore comment node when warn (fix#869) (#875)
1 parent 4cb3c5c commit 0dba5d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from './Transition'
1010
import {
1111
Fragment,
12+
Comment,
1213
VNode,
1314
warn,
1415
resolveTransitionHooks,
@@ -108,7 +109,7 @@ const TransitionGroupImpl = {
108109
child,
109110
resolveTransitionHooks(child, cssTransitionProps, state, instance)
110111
)
111-
} else if (__DEV__) {
112+
} else if (__DEV__ && child.type !== Comment) {
112113
warn(`<TransitionGroup> children must be keyed.`)
113114
}
114115
}

0 commit comments

Comments
 (0)