summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--g4f/Provider/helper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/Provider/helper.py b/g4f/Provider/helper.py
index 9788bffd..2cab5e6f 100644
--- a/g4f/Provider/helper.py
+++ b/g4f/Provider/helper.py
@@ -51,7 +51,7 @@ def get_cookies(domain_name: str = '', raise_requirements_error: bool = True) ->
def set_cookies(domain_name: str, cookies: Cookies = None) -> None:
if cookies:
_cookies[domain_name] = cookies
- else:
+ elif domain_name in _cookies:
_cookies.pop(domain_name)
def load_cookies_from_browsers(domain_name: str, raise_requirements_error: bool = True) -> Cookies: