about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/followers/index.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-04-10 22:33:41 +0200
committerGitHub <noreply@github.com>2019-04-10 22:33:41 +0200
commit31e4fcb006c6ef2d8e1a4c765e897afa1cba1b5c (patch)
tree15a022b1b44f72fee2d83cfe6f8355b7334f9d9b /app/javascript/mastodon/features/followers/index.js
parentcb410f80a40d03b509cec244b0cdd4ed3957c6a0 (diff)
parent2f422b708f75bea87a49eb879ec3e0c3f35c2f9b (diff)
Merge pull request #985 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/mastodon/features/followers/index.js')
-rw-r--r--app/javascript/mastodon/features/followers/index.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/followers/index.js b/app/javascript/mastodon/features/followers/index.js
index ce6357c4c..e3387e1be 100644
--- a/app/javascript/mastodon/features/followers/index.js
+++ b/app/javascript/mastodon/features/followers/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', 'followers', props.params.accountId, 'items']),
   hasMore: !!state.getIn(['user_lists', 'followers', props.params.accountId, 'next']),
   blockedBy: state.getIn(['relationships', props.params.accountId, 'blocked_by'], false),
@@ -33,6 +35,7 @@ class Followers extends ImmutablePureComponent {
     accountIds: ImmutablePropTypes.list,
     hasMore: PropTypes.bool,
     blockedBy: PropTypes.bool,
+    isAccount: PropTypes.bool,
   };
 
   componentWillMount () {
@@ -52,7 +55,15 @@ class Followers 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 (