summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/daemon-rpc.ts20
1 files changed, 9 insertions, 11 deletions
diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts
index e2a909b756..f4d47c7916 100644
--- a/gui/src/main/daemon-rpc.ts
+++ b/gui/src/main/daemon-rpc.ts
@@ -1232,21 +1232,19 @@ function convertFromLocation(location: grpcTypes.LocationConstraint.AsObject): R
// FIXME: This is a hack that assumes that the LocationConstraint is not a custom list.
// If it is we just set the country to "any" even if that isn't correct.
if (location.location == undefined) {
- return { country: "any" };
+ return { country: 'any' };
}
- else {
- const loc = location.location;
+ const loc = location.location;
- if (loc.hostname) {
- return { hostname: [loc.country, loc.city, loc.hostname] };
- }
-
- if (loc.city) {
- return { city: [loc.country, loc.city] };
- }
+ if (loc.hostname) {
+ return { hostname: [loc.country, loc.city, loc.hostname] };
+ }
- return { country: loc.country };
+ if (loc.city) {
+ return { city: [loc.country, loc.city] };
}
+
+ return { country: loc.country };
}
function convertFromTunnelOptions(tunnelOptions: grpcTypes.TunnelOptions.AsObject): ITunnelOptions {