summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-01-12 13:14:18 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-01-15 16:21:31 +0100
commitf5790db553aaa177288ff369e30ea97ee8565b48 (patch)
treefc7f83558ffd28f1d7d14aaf6457cb243291487a /app
parent4aff36938c33443a2834acf8df1c515af8b4d558 (diff)
downloadmullvadvpn-f5790db553aaa177288ff369e30ea97ee8565b48.tar.xz
mullvadvpn-f5790db553aaa177288ff369e30ea97ee8565b48.zip
Add optional attribute to Location.city
Diffstat (limited to 'app')
-rw-r--r--app/lib/ipc-facade.js6
-rw-r--r--app/redux/connection/actions.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/app/lib/ipc-facade.js b/app/lib/ipc-facade.js
index b54cbe5177..145971e289 100644
--- a/app/lib/ipc-facade.js
+++ b/app/lib/ipc-facade.js
@@ -1,7 +1,7 @@
// @flow
import JsonRpcWs, { InvalidReply } from './jsonrpc-ws-ipc';
-import { object, string, number, boolean, enumeration, arrayOf, oneOf } from 'validated/schema';
+import { object, maybe, string, number, boolean, enumeration, arrayOf, oneOf } from 'validated/schema';
import { validate } from 'validated/object';
export type AccountData = { expiry: string };
@@ -10,7 +10,7 @@ export type Ip = string;
export type Location = {
ip: Ip,
country: string,
- city: string,
+ city: ?string,
latitude: number,
longitude: number,
mullvad_exit_ip: boolean,
@@ -18,7 +18,7 @@ export type Location = {
const LocationSchema = object({
ip: string,
country: string,
- city: string,
+ city: maybe(string),
latitude: number,
longitude: number,
mullvad_exit_ip: boolean,
diff --git a/app/redux/connection/actions.js b/app/redux/connection/actions.js
index fb18777124..6f0da8cecf 100644
--- a/app/redux/connection/actions.js
+++ b/app/redux/connection/actions.js
@@ -33,7 +33,7 @@ type NewLocationAction = {
newLocation: {
ip: Ip,
country: string,
- city: string,
+ city: ?string,
latitude: number,
longitude: number,
mullvadExitIp: boolean,