Refactor hasToken()

stable/1.0.x
Alex Gleason 2020-04-29 19:13:05 -05:00
rodzic 5c0c1932e0
commit bc3bb47829
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

@ -9,10 +9,7 @@ export const ME_FETCH_SKIP = 'ME_FETCH_SKIP';
export const ME_PATCH_REQUEST = 'ME_PATCH_REQUEST';
export const ME_PATCH_FAIL = 'ME_PATCH_FAIL';
function hasToken(getState) {
const accessToken = getState().getIn(['auth', 'user', 'access_token']);
return Boolean(accessToken);
}
const hasToken = getState => getState().hasIn(['auth', 'user', 'access_token']);
export function fetchMe() {
return (dispatch, getState) => {