about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/following/index.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-04-09 05:02:48 +0200
committerGitHub <noreply@github.com>2019-04-09 05:02:48 +0200
commit56f29c38b603a98e7b9715c48de022106d8da073 (patch)
treeae9d1f6ecd5869a306059deebbe7ed9998d8123f /app/javascript/mastodon/features/following/index.js
parentba1a78d1687a8e5bd1e969af41852a28192e5231 (diff)
Fix glitched out "not found" message for non-existing profiles in web UI (#10517)
Diffstat (limited to 'app/javascript/mastodon/features/following/index.js')
-rw-r--r--app/javascript/mastodon/features/following/index.js13
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 (