From 9d7f0e5315be0da6574ef1febc80ddb1f5deef32 Mon Sep 17 00:00:00 2001 From: Alexander Djenkov Date: Thu, 25 Jan 2018 11:37:47 +0200 Subject: [PATCH] fix(frame): recreate frame if no cached one found on app resume #5318 (#5330) --- tns-core-modules/ui/frame/frame.android.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tns-core-modules/ui/frame/frame.android.ts b/tns-core-modules/ui/frame/frame.android.ts index 90f916b5d..094a9fbfc 100644 --- a/tns-core-modules/ui/frame/frame.android.ts +++ b/tns-core-modules/ui/frame/frame.android.ts @@ -945,7 +945,7 @@ function setActivityContent(activity: android.app.Activity, savedInstanceState: if (!rootView) { // If we have frameId from extras - we are starting a new activity from navigation (e.g. new Frame().navigate())) // Then we check if we have frameId from savedInstanceState - this happens when Activity is destroyed but app was not (e.g. suspend) - rootView = frameId >= 0 ? getFrameById(frameId) : new Frame(); + rootView = getFrameById(frameId) || new Frame(); } if (rootView instanceof Frame) {