mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-04-25 05:16:18 +02:00
refactor: select first profile if no running profiles are available
This commit is contained in:
@@ -97,15 +97,7 @@ export function ProfileSelectorDialog({
|
||||
if (runningAvailableProfile) {
|
||||
setSelectedProfile(runningAvailableProfile.name);
|
||||
} else {
|
||||
// If no running profile is available, find the first available profile
|
||||
const availableProfile = profileList.find(
|
||||
(profile) =>
|
||||
profile.browser !== "tor-browser" &&
|
||||
profile.browser !== "mullvad-browser",
|
||||
);
|
||||
if (availableProfile) {
|
||||
setSelectedProfile(availableProfile.name);
|
||||
}
|
||||
setSelectedProfile(profileList[0].name);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user