File tree 1 file changed +3
-2
lines changed
Filter options
packages/core/ui/layouts/root-layout 1 file changed +3
-2
lines changed
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { GridLayout } from '../grid-layout';
5
5
import { RootLayout , RootLayoutOptions , ShadeCoverOptions , TransitionAnimation } from '.' ;
6
6
import { Animation } from '../../animation' ;
7
7
import { AnimationDefinition } from '../../animation' ;
8
+ import { isNumber } from '../../../utils/types' ;
8
9
9
10
@CSSType ( 'RootLayout' )
10
11
export class RootLayoutBase extends GridLayout {
@@ -382,8 +383,8 @@ export class RootLayoutBase extends GridLayout {
382
383
target : targetView ,
383
384
...defaultTransitionAnimation ,
384
385
...( exitTo || { } ) ,
385
- translate : { x : exitTo . translateX || defaultTransitionAnimation . translateX , y : exitTo . translateY || defaultTransitionAnimation . translateY } ,
386
- scale : { x : exitTo . scaleX || defaultTransitionAnimation . scaleX , y : exitTo . scaleY || defaultTransitionAnimation . scaleY } ,
386
+ translate : { x : isNumber ( exitTo . translateX ) ? exitTo . translateX : defaultTransitionAnimation . translateX , y : isNumber ( exitTo . translateY ) ? exitTo . translateY : defaultTransitionAnimation . translateY } ,
387
+ scale : { x : isNumber ( exitTo . scaleX ) ? exitTo . scaleX : defaultTransitionAnimation . scaleX , y : isNumber ( exitTo . scaleY ) ? exitTo . scaleY : defaultTransitionAnimation . scaleY } ,
387
388
} ;
388
389
}
389
390
You can’t perform that action at this time.
0 commit comments