Skip to content

Commit f532a82

Browse files
todoroneaksonov
authored andcommitted
Fixes onExit never invoked as scene's instance method (#2759)
1 parent f2c9c0d commit f532a82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/navigationStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,13 @@ function createWrapper(Component, wrapBy, store: NavigationStore) {
300300
}
301301
componentWillUnmount() {
302302
const navigation = this.props.navigation;
303-
this.ref = null;
304303
if (this.ref && navigation && navigation.state && navigation.state.routeName) {
305304
store.deleteRef(originalRouteName(navigation.state.routeName));
306305
}
307306
if (this.ref && this.ref.onExit) {
308307
this.ref.onExit(navigation && navigation.state);
309308
}
309+
this.ref = null;
310310
}
311311
onRef(ref) {
312312
this.ref = ref;

0 commit comments

Comments
 (0)