diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-05-18 22:34:48 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-05-23 22:43:57 +0200 |
| commit | db69880fe6d95e05553689471dd5417c8a30b5bd (patch) | |
| tree | f1bc9201bb591ba68f3005991ccb605d1b959ac8 | |
| parent | 49e6a1aca0a3b3349c57739ad67ea0756e3627f5 (diff) | |
| download | mullvadvpn-db69880fe6d95e05553689471dd5417c8a30b5bd.tar.xz mullvadvpn-db69880fe6d95e05553689471dd5417c8a30b5bd.zip | |
Fixes logout bug
| -rw-r--r-- | app/lib/backend-redux-actions.js | 2 | ||||
| -rw-r--r-- | test/actions.spec.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/lib/backend-redux-actions.js b/app/lib/backend-redux-actions.js index 66300613d2..4e3dd63323 100644 --- a/app/lib/backend-redux-actions.js +++ b/app/lib/backend-redux-actions.js @@ -58,7 +58,7 @@ export default function mapBackendEventsToReduxActions(backend, store) { const onLogout = () => { store.dispatch(userActions.loginChange({ status: LoginState.none, - account: null, + account: '', paidUntil: null, error: null })); diff --git a/test/actions.spec.js b/test/actions.spec.js index 8097de7721..d8f8bfbc26 100644 --- a/test/actions.spec.js +++ b/test/actions.spec.js @@ -34,7 +34,7 @@ describe('actions', function() { it('should logout', (done) => { const expectedActions = [ - { type: 'USER_LOGIN_CHANGE', payload: { account: null, paidUntil: null, status: 'none', error: null } }, + { type: 'USER_LOGIN_CHANGE', payload: { account: '', paidUntil: null, status: 'none', error: null } }, ]; const store = mockStore(mockState()); @@ -117,7 +117,7 @@ describe('actions', function() { it('should disconnect from VPN server on logout', (done) => { const expectedActions = [ - { type: 'USER_LOGIN_CHANGE', payload: { account: null, paidUntil: null, status: 'none', error: null } }, + { type: 'USER_LOGIN_CHANGE', payload: { account: '', paidUntil: null, status: 'none', error: null } }, { type: 'CONNECTION_CHANGE', payload: { serverAddress: null, status: 'disconnected' } } ]; |
