Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
Unneeded calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahalwy committed Sep 2, 2016
1 parent 4e9489c commit 8531af7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/redux/actions/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 3 additions & 1 deletion src/redux/modules/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
FACEBOOK_SUCCESS,
FACEBOOK_FAILURE,
LOGOUT_SUCCESS,
LOAD_SUCCESS
LOAD_SUCCESS,
LOAD_FAILURE
} from '../constants/auth';

const initialState = {
Expand All @@ -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');

Expand Down

0 comments on commit 8531af7

Please sign in to comment.