Skip to content

Commit

Permalink
fix: skip check if MiAuthState is null
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Mar 30, 2024
1 parent 20a8f03 commit 79fb164
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/provider/miauth_notifier_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class MiAuthNotifier extends _$MiAuthNotifier {
}

Future<bool> check() async {
if (state == null) {
return true;
}
final result = await ref.read(miAuthRepositoryProvider).check(
state!.host,
state!.sessionId,
Expand Down

0 comments on commit 79fb164

Please sign in to comment.