summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2017-11-22 11:25:54 +0100
committerAndrej Mihajlov <and@mullvad.net>2017-11-23 12:41:13 +0100
commite7782654f1ffc7268dd6295096bc9c7857cd3ec9 (patch)
treeeb1a829046a88277414376b3fca30dcc33c2915a /app
parent6311cfea6ca8546c8ad854debd2cad785cd5eca3 (diff)
downloadmullvadvpn-e7782654f1ffc7268dd6295096bc9c7857cd3ec9.tar.xz
mullvadvpn-e7782654f1ffc7268dd6295096bc9c7857cd3ec9.zip
Inline onConnecting
Diffstat (limited to 'app')
-rw-r--r--app/redux/connection/reducers.js13
1 files changed, 1 insertions, 12 deletions
diff --git a/app/redux/connection/reducers.js b/app/redux/connection/reducers.js
index ce4cb79344..48177fc5b6 100644
--- a/app/redux/connection/reducers.js
+++ b/app/redux/connection/reducers.js
@@ -38,7 +38,7 @@ export default function(state: ConnectionReduxState = initialState, action: Redu
return { ...state, ...action.newLocation };
case 'CONNECTING':
- return onConnecting(state, action);
+ return { ...state, ...{ status: 'connecting', serverAddress: action.host }};
case 'CONNECTED':
return { ...state, ...{ status: 'connected' }};
@@ -56,14 +56,3 @@ export default function(state: ConnectionReduxState = initialState, action: Redu
return state;
}
}
-
-function onConnecting(state, action) {
- const newState: $Shape<ConnectionReduxState> = {
- status: 'connecting',
- };
-
- if (action.host) {
- newState.serverAddress = action.host;
- }
- return { ...state, ...newState};
-}