about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/account_timeline/index.js
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-27 20:48:12 +0100
committerGitHub <noreply@github.com>2022-11-27 20:48:12 +0100
commit3ffaa966b0ba11b318e9a93b41854aa765d2ed5c (patch)
treeae7ff603d5d36b5c78edf49491bf98f91ad82ecd /app/javascript/mastodon/features/account_timeline/index.js
parent57b893d505a6fd0a11b9e53261bc029adee2aa24 (diff)
Fix infinite loading instead of soft 404 for non-existing remote accounts (#21303)
Fixes #21278, #21021
Diffstat (limited to 'app/javascript/mastodon/features/account_timeline/index.js')
-rw-r--r--app/javascript/mastodon/features/account_timeline/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/account_timeline/index.js b/app/javascript/mastodon/features/account_timeline/index.js
index 525837c72..bdb430a33 100644
--- a/app/javascript/mastodon/features/account_timeline/index.js
+++ b/app/javascript/mastodon/features/account_timeline/index.js
@@ -26,7 +26,13 @@ const emptyList = ImmutableList();
 const mapStateToProps = (state, { params: { acct, id, tagged }, withReplies = false }) => {
   const accountId = id || state.getIn(['accounts_map', normalizeForLookup(acct)]);
 
-  if (!accountId) {
+  if (accountId === null) {
+    return {
+      isLoading: false,
+      isAccount: false,
+      statusIds: emptyList,
+    };
+  } else if (!accountId) {
     return {
       isLoading: true,
       statusIds: emptyList,