diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-11-15 09:55:48 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2024-01-29 09:33:49 +0100 |
| commit | db9f5abf496019d3e40b62833c334b550e2d759a (patch) | |
| tree | 3d7c1f5dec3f9c28fdb9df604bfead229217a7b1 /gui/src/renderer | |
| parent | 4d5a0533149b9af4541c002591ebc32255c5d433 (diff) | |
| download | mullvadvpn-db9f5abf496019d3e40b62833c334b550e2d759a.tar.xz mullvadvpn-db9f5abf496019d3e40b62833c334b550e2d759a.zip | |
Add api acces methods to daemon-rpc
Diffstat (limited to 'gui/src/renderer')
| -rw-r--r-- | gui/src/renderer/components/select-location/custom-list-helpers.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gui/src/renderer/components/select-location/custom-list-helpers.ts b/gui/src/renderer/components/select-location/custom-list-helpers.ts index 40d77ba33d..799deb8ed3 100644 --- a/gui/src/renderer/components/select-location/custom-list-helpers.ts +++ b/gui/src/renderer/components/select-location/custom-list-helpers.ts @@ -1,6 +1,7 @@ import { useMemo } from 'react'; import { ICustomList, RelayLocation } from '../../../shared/daemon-rpc-types'; +import { hasValue } from '../../../shared/utils'; import { searchMatch } from '../../lib/filter-locations'; import { useSelector } from '../../redux/store'; import { useDisabledLocation, useSelectedLocation } from './RelayListContext'; @@ -169,7 +170,3 @@ function updateRelay(relay: RelaySpecification, customList: string): RelaySpecif visible: true, }; } - -function hasValue<T>(value: T): value is NonNullable<T> { - return value !== undefined && value !== null; -} |
