diff --git a/src/redux/actions/auth.js b/src/redux/actions/auth.js index a38386751..5ced5b33a 100644 --- a/src/redux/actions/auth.js +++ b/src/redux/actions/auth.js @@ -11,7 +11,7 @@ import { } from '../constants/auth'; export function isLoaded(globalState) { - return globalState.auth && globalState.auth.loaded; + return globalState.auth && globalState.auth.user; } export function load() { diff --git a/src/redux/modules/auth.js b/src/redux/modules/auth.js index 71a5aa306..96e575815 100644 --- a/src/redux/modules/auth.js +++ b/src/redux/modules/auth.js @@ -4,7 +4,8 @@ import { FACEBOOK_SUCCESS, FACEBOOK_FAILURE, LOGOUT_SUCCESS, - LOAD_SUCCESS + LOAD_SUCCESS, + LOAD_FAILURE } from '../constants/auth'; const initialState = { @@ -29,6 +30,7 @@ export default function reducer(state = initialState, action = {}) { }; case FACEBOOK_FAILURE: return state; + case LOAD_FAILURE: case LOGOUT_SUCCESS: cookie.remove('accessToken');