diff --git a/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt b/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt index 2385ac2e..1ea5b1d2 100644 --- a/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt +++ b/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt @@ -47,7 +47,12 @@ abstract class TurboSessionNavHostFragment : NavHostFragment() { currentNavDestination.clearBackStack { session.reset() initControllerGraph() - onReset() + + if (view == null) { + onReset() + } else { + requireView().post { onReset() } + } } } }