Skip to content

Commit 72eb015

Browse files
committed
test: add flow to TransitionStub
1 parent 032fe20 commit 72eb015

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/TransitionStub.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
/* eslint-disable */
1+
// @flow
2+
23
import { warn } from '../lib/util'
34

45
function getRealChild (vnode: ?VNode): ?VNode {
5-
const compOptions: ?VNodeComponentOptions = vnode && vnode.componentOptions
6+
const compOptions = vnode && vnode.componentOptions
67
if (compOptions && compOptions.Ctor.options.abstract) {
78
return getRealChild(getFirstComponentChild(compOptions.children))
89
} else {
@@ -31,7 +32,7 @@ export const camelize = (str: string): string => {
3132

3233
function extractTransitionData (comp: Component): Object {
3334
const data = {}
34-
const options: ComponentOptions = comp.$options
35+
const options = comp.$options
3536
// props
3637
for (const key in options.propsData) {
3738
data[key] = comp[key]
@@ -71,8 +72,7 @@ export default {
7172
if (children.length > 1) {
7273
warn(
7374
'<transition> can only be used on a single element. Use ' +
74-
'<transition-group> for lists.',
75-
this.$parent
75+
'<transition-group> for lists.'
7676
)
7777
}
7878

@@ -82,8 +82,7 @@ export default {
8282
if (mode && mode !== 'in-out' && mode !== 'out-in'
8383
) {
8484
warn(
85-
'invalid <transition> mode: ' + mode,
86-
this.$parent
85+
'invalid <transition> mode: ' + mode
8786
)
8887
}
8988

0 commit comments

Comments
 (0)