diff options
| author | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-02-21 15:38:57 +0100 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-02-28 10:45:00 +0100 |
| commit | 82445a06dea65d151794180ba4b95367d9c8d39c (patch) | |
| tree | 448fcaa2066a5086c1746ecda8ba21efac8f028d | |
| parent | d4667f94b7e16a9d00afcc55c2f6ef5d9b7c802b (diff) | |
| download | mullvadvpn-82445a06dea65d151794180ba4b95367d9c8d39c.tar.xz mullvadvpn-82445a06dea65d151794180ba4b95367d9c8d39c.zip | |
Ensure a country is disabled if all its cities are disabled
This situation can happen when multihop is
enabled and when a country only has a single
city, which in turn only has a single relay
and that relay has already been used as Entry
and the user is viewing the Exit view, or vice
versa.
| -rw-r--r-- | desktop/packages/mullvad-vpn/src/renderer/components/select-location/select-location-helpers.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/select-location/select-location-helpers.ts b/desktop/packages/mullvad-vpn/src/renderer/components/select-location/select-location-helpers.ts index 0d0931f552..3f5f1985b5 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/select-location/select-location-helpers.ts +++ b/desktop/packages/mullvad-vpn/src/renderer/components/select-location/select-location-helpers.ts @@ -162,7 +162,7 @@ export function isCountryDisabled( disabledLocation?: { location: RelayLocation; reason: DisabledReason }, ): DisabledReason | undefined { const citiesDisabled = country.cities.map((city) => - isCityDisabled(city, { ...location, city: city.code }), + isCityDisabled(city, { ...location, city: city.code }, disabledLocation), ); if (citiesDisabled.every((status) => status === DisabledReason.inactive)) { return DisabledReason.inactive; |
