about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/following/index.js
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-04-12 01:38:18 -0700
committerReverite <github@reverite.sh>2019-04-12 01:38:18 -0700
commite10a9794f4ed7c90e3190f285359f55dd00da435 (patch)
tree579ebf95d6bbf091d05e66907a9c8168c926e0af /app/javascript/flavours/glitch/features/following/index.js
parentff736905fa534f7189e57c1d0c14fbac45f239a1 (diff)
parentbb50ec2e6687238ad8b2ec545a73270fee7a7b09 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/features/following/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/following/index.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/following/index.js b/app/javascript/flavours/glitch/features/following/index.js
index 3f2f091a1..ad1445f3a 100644
--- a/app/javascript/flavours/glitch/features/following/index.js
+++ b/app/javascript/flavours/glitch/features/following/index.js
@@ -15,8 +15,10 @@ import ProfileColumnHeader from 'flavours/glitch/features/account/components/pro
 import HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container';
 import LoadMore from 'flavours/glitch/components/load_more';
 import ImmutablePureComponent from 'react-immutable-pure-component';
+import MissingIndicator from 'flavours/glitch/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']),
 });
@@ -29,6 +31,7 @@ export default class Following extends ImmutablePureComponent {
     dispatch: PropTypes.func.isRequired,
     accountIds: ImmutablePropTypes.list,
     hasMore: PropTypes.bool,
+    isAccount: PropTypes.bool,
   };
 
   componentWillMount () {
@@ -70,7 +73,15 @@ export default class Following extends ImmutablePureComponent {
   }
 
   render () {
-    const { accountIds, hasMore } = this.props;
+    const { accountIds, hasMore, isAccount } = this.props;
+
+    if (!isAccount) {
+      return (
+        <Column>
+          <MissingIndicator />
+        </Column>
+      );
+    }
 
     let loadMore = null;