refactor: select first profile if no running profiles are available

This commit is contained in:
zhom
2025-08-02 18:22:29 +04:00
parent 8f05c48594
commit 66d3420000
+1 -9
View File
@@ -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) {