diff --git a/IonicPortals/src/main/kotlin/io/ionic/portals/PortalFragment.kt b/IonicPortals/src/main/kotlin/io/ionic/portals/PortalFragment.kt index ca63533..2b73fdb 100644 --- a/IonicPortals/src/main/kotlin/io/ionic/portals/PortalFragment.kt +++ b/IonicPortals/src/main/kotlin/io/ionic/portals/PortalFragment.kt @@ -300,7 +300,13 @@ open class PortalFragment : Fragment { val existingPortalName = savedInstanceState?.getString(PORTAL_NAME, null) if (existingPortalName != null && portal == null) { - portal = PortalManager.getPortal(existingPortalName) + try { + portal = PortalManager.getPortal(existingPortalName) + } catch (e: Exception) { + Logger.warn("Attempted to reload PortalFragment from App restore but portal not found.") + Logger.warn("No portal named $existingPortalName found in PortalManager to use.") + Logger.warn("Portal reload is unsuccessful. This is likely okay and safe to ignore if your app is returning from a force quit state.") + } } if (portal != null) { diff --git a/package.json b/package.json index 44cee0a..e7e114c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ionic-portals-android", - "version": "0.10.1", + "version": "0.10.2", "description": "Ionic Portals", "homepage": "https://ionic.io/portals", "author": "Ionic Team (https://ionic.io)",