@@ -76,10 +76,10 @@ export class RootLayout extends RootLayoutBase {
7676 return this . _playAnimation ( this . _getAnimationSet ( view , exitState ) , exitState ?. duration ) ;
7777 }
7878
79- private _getAnimationSet ( view : View , shadeCoverAnimation : TransitionAnimation , backgroundColor : string = defaultShadeCoverOptions . color ) : Array < android . animation . Animator > {
79+ private _getAnimationSet ( view : View , shadeCoverAnimation : TransitionAnimation , backgroundColor ? : string ) : Array < android . animation . Animator > {
8080 const isBackgroundGradient = backgroundColor && backgroundColor . startsWith ( 'linear-gradient' ) ;
8181
82- const animationSet = Array . create ( android . animation . Animator , isBackgroundGradient ? 6 : 7 ) ;
82+ const animationSet = Array . create ( android . animation . Animator , ! backgroundColor || isBackgroundGradient ? 6 : 7 ) ;
8383 animationSet [ 0 ] = android . animation . ObjectAnimator . ofFloat ( view . nativeViewProtected , 'translationX' , [ shadeCoverAnimation . translateX ] ) ;
8484 animationSet [ 1 ] = android . animation . ObjectAnimator . ofFloat ( view . nativeViewProtected , 'translationY' , [ shadeCoverAnimation . translateY ] ) ;
8585 animationSet [ 2 ] = android . animation . ObjectAnimator . ofFloat ( view . nativeViewProtected , 'scaleX' , [ shadeCoverAnimation . scaleX ] ) ;
@@ -97,7 +97,10 @@ export class RootLayout extends RootLayoutBase {
9797 if ( view . backgroundImage ) {
9898 view . backgroundImage = undefined ;
9999 }
100- animationSet [ 6 ] = this . _getBackgroundColorAnimator ( view , backgroundColor ) ;
100+
101+ if ( backgroundColor ) {
102+ animationSet [ 6 ] = this . _getBackgroundColorAnimator ( view , backgroundColor ) ;
103+ }
101104 }
102105 return animationSet ;
103106 }
0 commit comments