Skip to content

Commit 9d7f0e5

Browse files
ADjenkovAlexander Vakrilov
authored and
Alexander Vakrilov
committed
fix(frame): recreate frame if no cached one found on app resume NativeScript#5318 (NativeScript#5330)
1 parent af934cc commit 9d7f0e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ function setActivityContent(activity: android.app.Activity, savedInstanceState:
945945
if (!rootView) {
946946
// If we have frameId from extras - we are starting a new activity from navigation (e.g. new Frame().navigate()))
947947
// Then we check if we have frameId from savedInstanceState - this happens when Activity is destroyed but app was not (e.g. suspend)
948-
rootView = frameId >= 0 ? getFrameById(frameId) : new Frame();
948+
rootView = getFrameById(frameId) || new Frame();
949949
}
950950

951951
if (rootView instanceof Frame) {

0 commit comments

Comments
 (0)