Skip to content

Commit

Permalink
update default browser
Browse files Browse the repository at this point in the history
  • Loading branch information
yuezk committed Oct 31, 2024
1 parent 222fe26 commit 6542d67
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/gpapi/src/process/browser_authenticator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
}
}

Expand Down

0 comments on commit 6542d67

Please sign in to comment.