fix: add missing descriptor obtaining (#340)

This commit is contained in:
Michał Osadnik
2020-01-06 23:30:36 +01:00
parent f8fa187776
commit ef8e4e23f4

View File

@@ -556,7 +556,7 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx sr
- });
+ ) => {
+ const { descriptors } = this.props;
+ const descriptor = descriptors[route.key];
+ const descriptor = descriptors[route.key] || this.state.descriptors[route.key];
+
+ descriptor &&
+ descriptor.options.onTransitionStart &&
@@ -574,7 +574,7 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx sr
- });
+ ) => {
+ const { descriptors } = this.props;
+ const descriptor = descriptors[route.key];
+ const descriptor = descriptors[route.key] || this.state.descriptors[route.key];
+
+ descriptor &&
+ descriptor.options.onTransitionEnd &&