Don't rely on ['auth', 'me']

This commit is contained in:
Alex Gleason 2021-03-30 00:23:29 -05:00
parent dcd08b2b3f
commit 09cbcf6145
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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']);
};