Don't rely on ['auth', 'me']
This commit is contained in:
parent
dcd08b2b3f
commit
09cbcf6145
|
@ -17,7 +17,7 @@ export function fetchMe() {
|
|||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
|
||||
const me = state.getIn(['auth', 'me']);
|
||||
const me = state.get('me') || state.getIn(['auth', 'me']);
|
||||
const token = state.getIn(['auth', 'users', me, 'access_token']);
|
||||
|
||||
if (!token) {
|
||||
|
|
|
@ -3,6 +3,6 @@ export const isLoggedIn = getState => {
|
|||
};
|
||||
|
||||
export const getAccessToken = state => {
|
||||
const me = state.getIn(['auth', 'me']);
|
||||
const me = state.get('me');
|
||||
return state.getIn(['auth', 'users', me, 'access_token']);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue