From 5793d3e594a59d6694b81dfa90c575167e0b19da Mon Sep 17 00:00:00 2001 From: Edouard Marquez Date: Mon, 22 Apr 2024 19:25:03 +0200 Subject: [PATCH] Fix a too-restrictive condition (#916) --- lib/src/utils/http_helper.dart | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/src/utils/http_helper.dart b/lib/src/utils/http_helper.dart index 9333f1b80c..35cfe691bf 100644 --- a/lib/src/utils/http_helper.dart +++ b/lib/src/utils/http_helper.dart @@ -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!; }