File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
- /** @module hooks */ /** for typedoc */
2
- import { TransitionStateHookFn } from "../transition/interface" ;
3
- import { Transition } from "../transition/transition" ;
4
- import { TransitionService } from "../transition/transitionService" ;
1
+ /** @module hooks */
2
+ /** for typedoc */
3
+ import { TransitionStateHookFn } from '../transition/interface' ;
4
+ import { Transition } from '../transition/transition' ;
5
+ import { TransitionService } from '../transition/transitionService' ;
5
6
import { StateDeclaration } from '../state/interface' ;
7
+ import { StateObject } from '../state/stateObject' ;
6
8
7
9
/**
8
10
* A factory which creates an onEnter, onExit or onRetain transition hook function
@@ -14,7 +16,8 @@ import { StateDeclaration } from '../state/interface';
14
16
*/
15
17
function makeEnterExitRetainHook ( hookName : string ) : TransitionStateHookFn {
16
18
return ( transition : Transition , state : StateDeclaration ) => {
17
- let hookFn : TransitionStateHookFn = state [ hookName ] ;
19
+ let _state : StateObject = state . $$state ( ) ;
20
+ let hookFn : TransitionStateHookFn = _state [ hookName ] ;
18
21
return hookFn ( transition , state ) ;
19
22
}
20
23
}
You can’t perform that action at this time.
0 commit comments