Skip to content

Commit 5adb650

Browse files
committed
fix: fixed onTransitionStart exception
1 parent dfd5a33 commit 5adb650

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/createSharedElementStackNavigator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ function createSharedElementEnabledNavigator(
4646
outputRange: index > prevIndex ? [0, 1] : [2, 1],
4747
})
4848
);
49-
if (navigatorConfig.onTransitionStart) {
49+
if (navigatorConfig && navigatorConfig.onTransitionStart) {
5050
navigatorConfig.onTransitionStart(transitionProps, prevTransitionProps);
5151
}
5252
},
5353
onTransitionEnd: (transitionProps: any, prevTransitionProps: any) => {
5454
// console.log('onTransitionEnd: ', transitionProps, prevTransitionProps);
5555
rendererData.endTransition();
56-
if (navigatorConfig.onTransitionEnd) {
56+
if (navigatorConfig && navigatorConfig.onTransitionEnd) {
5757
navigatorConfig.onTransitionEnd(transitionProps, prevTransitionProps);
5858
}
5959
},

0 commit comments

Comments
 (0)