From 6542d677a929dd3cb8259719abb189db0394e845 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Thu, 31 Oct 2024 14:31:13 +0000 Subject: [PATCH] update default browser --- crates/gpapi/src/process/browser_authenticator.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/gpapi/src/process/browser_authenticator.rs b/crates/gpapi/src/process/browser_authenticator.rs index e57270f..7657ca3 100644 --- a/crates/gpapi/src/process/browser_authenticator.rs +++ b/crates/gpapi/src/process/browser_authenticator.rs @@ -17,9 +17,14 @@ impl BrowserAuthenticator<'_> { } pub fn new_with_browser<'a>(auth_request: &'a str, browser: &'a str) -> BrowserAuthenticator<'a> { + let browser = browser.trim(); BrowserAuthenticator { auth_request, - browser: if browser == "default" { None } else { Some(browser) }, + browser: if browser.is_empty() || browser == "default" { + None + } else { + Some(browser) + }, } }