diff --git a/app/soapbox/actions/me.js b/app/soapbox/actions/me.js index 5b58b50b1..497e08b94 100644 --- a/app/soapbox/actions/me.js +++ b/app/soapbox/actions/me.js @@ -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) { diff --git a/app/soapbox/utils/auth.js b/app/soapbox/utils/auth.js index 6d3bb3d7f..20ae3f842 100644 --- a/app/soapbox/utils/auth.js +++ b/app/soapbox/utils/auth.js @@ -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']); };