Skip to content

Commit

Permalink
fix: check cardStyleInterpolator name to allow for custom animation a…
Browse files Browse the repository at this point in the history
…s well
  • Loading branch information
drager committed Feb 13, 2023
1 parent a452ecb commit 765564a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/stack/src/views/Stack/CardStack.tsx
Expand Up @@ -18,10 +18,7 @@ import {
} from 'react-native';
import type { EdgeInsets } from 'react-native-safe-area-context';

import {
forModalPresentationIOS,
forNoAnimation as forNoAnimationCard,
} from '../../TransitionConfigs/CardStyleInterpolators';
import { forNoAnimation as forNoAnimationCard } from '../../TransitionConfigs/CardStyleInterpolators';
import {
DefaultTransition,
ModalFadeTransition,
Expand Down Expand Up @@ -522,8 +519,10 @@ export default class CardStack extends React.Component<Props, State> {
: getIsModalPresentation(options.cardStyleInterpolator)
? i !==
scenes
.map((scene) => scene.descriptor.options.cardStyleInterpolator)
.lastIndexOf(forModalPresentationIOS)
.map(
(scene) => scene.descriptor.options.cardStyleInterpolator.name
)
.lastIndexOf('forModalPresentationIOS')
: true,
} = options;

Expand Down

0 comments on commit 765564a

Please sign in to comment.