diff --git a/app/soapbox/actions/pin_statuses.js b/app/soapbox/actions/pin_statuses.js index 0a4a320c1..17f1bfd14 100644 --- a/app/soapbox/actions/pin_statuses.js +++ b/app/soapbox/actions/pin_statuses.js @@ -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());