FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(android): failure saving state in mixed parent/nested frame nav (… · NativeScript/NativeScript@e5f110f · GitHub

Commit e5f110f

Browse files
authored andcommitted
fix(android): failure saving state in mixed parent/nested frame nav (#6719)
1 parent 54b6df6 commit e5f110f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎tns-core-modules/ui/frame/frame.android.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,12 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks {
903903
return null;
904904
}
905905

906+
// [nested frames / fragments] see https://github.com/NativeScript/NativeScript/issues/6629
907+
// retaining reference to a destroyed fragment here somehow causes a cryptic
908+
// "IllegalStateException: Failure saving state: active fragment has cleared index: -1"
909+
// in a specific mixed parent / nested frame navigation scenario
910+
entry.fragment = null;
911+
906912
const page = entry.resolvedPage;
907913
if (!page) {
908914
traceError(`${fragment}.onDestroy: entry has no resolvedPage`);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL