Skip to content

Commit

Permalink
Fix redirect in tosti-shift route
Browse files Browse the repository at this point in the history
I made a typo here while rebasing, causing the unauthenticated
redirect to happen while authenticated.
  • Loading branch information
DeD1rk committed Sep 9, 2022
1 parent 540efcc commit 2ff9ef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ final List<GoRoute> routes = [
redirect: (state) {
// Redirect to TostiScreen if not authenticated.
// TODO: Is there a nicer way to pass tosti api to other pages?
if (state.extra is TostiApiRepository) return '/tosti';
if (state.extra is! TostiApiRepository) return '/tosti';
return null;
},
pageBuilder: (context, state) => MaterialPage(
Expand Down

0 comments on commit 2ff9ef8

Please sign in to comment.