From 8531af7ed6624f54b53a768fbacf1b00b39b5d22 Mon Sep 17 00:00:00 2001 From: Mohamed El Mahallawy Date: Thu, 18 Aug 2016 22:03:13 -0700 Subject: [PATCH] Unneeded calls --- src/redux/actions/auth.js | 2 +- src/redux/modules/auth.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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');