fix: guard journey map against an empty season list
Prevents StateError when data builder is called with empty list by displaying loading indicator instead of passing empty list to activeSeason(), matching title screen behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,9 @@ class SeasonMapScreen extends ConsumerWidget {
|
||||
loading: () =>
|
||||
const Scaffold(body: Center(child: CircularProgressIndicator())),
|
||||
error: (e, _) => Scaffold(body: Center(child: Text('$e'))),
|
||||
data: (list) => _JourneyMap(pack: activeSeason(list)),
|
||||
data: (list) => list.isEmpty
|
||||
? const Scaffold(body: Center(child: CircularProgressIndicator()))
|
||||
: _JourneyMap(pack: activeSeason(list)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user