diff options
Diffstat (limited to 'app/javascript/mastodon/features/following')
-rw-r--r-- | app/javascript/mastodon/features/following/index.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/following/index.js b/app/javascript/mastodon/features/following/index.js index 70e7fde06..3bf89fb2b 100644 --- a/app/javascript/mastodon/features/following/index.js +++ b/app/javascript/mastodon/features/following/index.js @@ -16,8 +16,10 @@ import Column from '../ui/components/column'; import HeaderContainer from '../account_timeline/containers/header_container'; import ColumnBackButton from '../../components/column_back_button'; import ScrollableList from '../../components/scrollable_list'; +import MissingIndicator from 'mastodon/components/missing_indicator'; const mapStateToProps = (state, props) => ({ + isAccount: !!state.getIn(['accounts', props.params.accountId]), accountIds: state.getIn(['user_lists', 'following', props.params.accountId, 'items']), hasMore: !!state.getIn(['user_lists', 'following', props.params.accountId, 'next']), blockedBy: state.getIn(['relationships', props.params.accountId, 'blocked_by'], false), @@ -33,6 +35,7 @@ class Following extends ImmutablePureComponent { accountIds: ImmutablePropTypes.list, hasMore: PropTypes.bool, blockedBy: PropTypes.bool, + isAccount: PropTypes.bool, }; componentWillMount () { @@ -52,7 +55,15 @@ class Following extends ImmutablePureComponent { }, 300, { leading: true }); render () { - const { shouldUpdateScroll, accountIds, hasMore, blockedBy } = this.props; + const { shouldUpdateScroll, accountIds, hasMore, blockedBy, isAccount } = this.props; + + if (!isAccount) { + return ( + <Column> + <MissingIndicator /> + </Column> + ); + } if (!accountIds) { return ( |