Skip to content

Commit

Permalink
Fix a too-restrictive condition
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k committed Apr 22, 2024
1 parent a07bdff commit 0c18fdc
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 0c18fdc

Please sign in to comment.