From fa42e124c747c3300051c870f1775ede4f457218 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Fri, 6 Feb 2026 06:06:26 +0100 Subject: [PATCH] check for empty route stack --- app/lib/core/providers/router.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/lib/core/providers/router.dart b/app/lib/core/providers/router.dart index 2d7fbc3c..736a83ab 100644 --- a/app/lib/core/providers/router.dart +++ b/app/lib/core/providers/router.dart @@ -62,8 +62,13 @@ class CurrentTopRoute extends _$CurrentTopRoute { void update() { final config = router.routerDelegate.currentConfiguration; - final match = config.last; + if (config.isEmpty) { + state = null; + return; + } + + final match = config.last; state = match.route; }