aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-12-15 14:07:34 +0100
committerGitHub <noreply@github.com>2022-12-15 14:07:34 +0100
commit1f762f4271685e30373b15a2e204f8edff59d349 (patch)
tree4209d84c829a89ffa0fabe25462c8213f593a778
parent78ef635980ff391ea3ba4c37de836947a97958a0 (diff)
downloadmastodon-1f762f4271685e30373b15a2e204f8edff59d349.tar
mastodon-1f762f4271685e30373b15a2e204f8edff59d349.tar.gz
mastodon-1f762f4271685e30373b15a2e204f8edff59d349.tar.bz2
mastodon-1f762f4271685e30373b15a2e204f8edff59d349.zip
Fix wasteful request to /api/v1/custom_emojis when not logged in (#22326)
-rw-r--r--app/javascript/mastodon/containers/mastodon.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js
index 724719f74..002b71e93 100644
--- a/app/javascript/mastodon/containers/mastodon.js
+++ b/app/javascript/mastodon/containers/mastodon.js
@@ -23,7 +23,9 @@ export const store = configureStore();
const hydrateAction = hydrateStore(initialState);
store.dispatch(hydrateAction);
-store.dispatch(fetchCustomEmojis());
+if (initialState.meta.me) {
+ store.dispatch(fetchCustomEmojis());
+}
const createIdentityContext = state => ({
signedIn: !!state.meta.me,