Skip to content

Commit

Permalink
Fix a too-restrictive condition (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Apr 22, 2024
1 parent a07bdff commit 5793d3e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/src/utils/http_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,7 @@ class HttpHelper {
headers.addAll({'Authorization': token});
}
}
if (addCookieToHeader) {
if (user?.cookie == null) {
throw Exception('A cookie must be set before calling this method');
}

if (addCookieToHeader && user?.cookie != null) {
headers['Cookie'] = user!.cookie!;
}

Expand Down

0 comments on commit 5793d3e

Please sign in to comment.