Add another isLoggedIn condition

This commit is contained in:
Alex Gleason 2021-03-25 12:28:53 -05:00
parent 71c62c05b8
commit 4ff1f0fa63
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -1,5 +1,6 @@
import api from '../api';
import { importFetchedStatuses } from './importer';
import { isLoggedIn } from 'soapbox/utils/auth';
export const PINNED_STATUSES_FETCH_REQUEST = 'PINNED_STATUSES_FETCH_REQUEST';
export const PINNED_STATUSES_FETCH_SUCCESS = 'PINNED_STATUSES_FETCH_SUCCESS';
@ -7,8 +8,8 @@ export const PINNED_STATUSES_FETCH_FAIL = 'PINNED_STATUSES_FETCH_FAIL';
export function fetchPinnedStatuses() {
return (dispatch, getState) => {
if (!isLoggedIn(getState)) return;
const me = getState().get('me');
if (!me) return;
dispatch(fetchPinnedStatusesRequest());