Skip to content

Commit

Permalink
fix(android): failure saving state in mixed parent/nested frame nav (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
manoldonev committed Dec 18, 2018
1 parent 89870f7 commit 4dc35a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tns-core-modules/ui/frame/frame.android.ts
Expand Up @@ -903,6 +903,12 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks {
return null;
}

// [nested frames / fragments] see https://github.com/NativeScript/NativeScript/issues/6629
// retaining reference to a destroyed fragment here somehow causes a cryptic
// "IllegalStateException: Failure saving state: active fragment has cleared index: -1"
// in a specific mixed parent / nested frame navigation scenario
entry.fragment = null;

const page = entry.resolvedPage;
if (!page) {
traceError(`${fragment}.onDestroy: entry has no resolvedPage`);
Expand Down

0 comments on commit 4dc35a5

Please sign in to comment.