File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1031,9 +1031,14 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks {
1031
1031
// animation should start between start and resume, so if we have an executing navigation here it probably means the animation was skipped
1032
1032
// so we manually set the entry
1033
1033
// also, to be compatible with fragments 1.2.x we need this setTimeout as animations haven't run on onResume yet
1034
+ const weakRef = new WeakRef ( this ) ;
1034
1035
setTimeout ( ( ) => {
1035
- if ( frame . _executingContext && ! ( < any > this . entry ) . isAnimationRunning ) {
1036
- frame . setCurrent ( this . entry , frame . _executingContext . navigationType ) ;
1036
+ const owner = weakRef . get ( ) ;
1037
+ if ( ! owner ) {
1038
+ return ;
1039
+ }
1040
+ if ( frame . _executingContext && ! ( < any > owner . entry ) . isAnimationRunning ) {
1041
+ frame . setCurrent ( owner . entry , frame . _executingContext . navigationType ) ;
1037
1042
}
1038
1043
} , 0 ) ;
1039
1044
You can’t perform that action at this time.
0 commit comments