mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(android): failure saving state in mixed parent/nested frame nav (#6719)
This commit is contained in:
committed by
SvetoslavTsenov
parent
54b6df669b
commit
e5f110fe5c
@@ -903,6 +903,12 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks {
|
|||||||
return null;
|
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;
|
const page = entry.resolvedPage;
|
||||||
if (!page) {
|
if (!page) {
|
||||||
traceError(`${fragment}.onDestroy: entry has no resolvedPage`);
|
traceError(`${fragment}.onDestroy: entry has no resolvedPage`);
|
||||||
|
|||||||
Reference in New Issue
Block a user