diff --git a/src/views/StackView/StackView.js b/src/views/StackView/StackView.js index 15e95c1..df7e410 100644 --- a/src/views/StackView/StackView.js +++ b/src/views/StackView/StackView.js @@ -33,10 +33,15 @@ class StackView extends React.Component { const { navigationConfig, navigation } = this.props; const onTransitionEnd = this.props.onTransitionEnd || navigationConfig.onTransitionEnd; - if (transition.navigation.state.isTransitioning) { + const transitionDestKey = transition.scene.route.key; + const isCurrentKey = + navigation.state.routes[navigation.state.index].key === + transitionDestKey; + if (transition.navigation.state.isTransitioning && isCurrentKey) { navigation.dispatch( StackActions.completeTransition({ key: navigation.state.key, + toChildKey: transitionDestKey, }) ); }