Skip to content

Commit

Permalink
Fixed the case where the backend returns an empty string instead of a…
Browse files Browse the repository at this point in the history
… Map.
  • Loading branch information
ybeshkarov committed Feb 26, 2024
1 parent ed55c6f commit 117cd03
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/src/service/user_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,14 @@ class UserService {
'/api/user/mobile/session',
options: options,
);
return response.data != null
? MobileSessionInfo.fromJson(response.data!)
: null;

try {
return response.data != null
? MobileSessionInfo.fromJson(response.data!)
: null;
} on Exception catch (_) {
return null;
}
}

Future<void> saveMobileSession(
Expand Down

0 comments on commit 117cd03

Please sign in to comment.