From 1f762f4271685e30373b15a2e204f8edff59d349 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 15 Dec 2022 14:07:34 +0100 Subject: [PATCH] Fix wasteful request to /api/v1/custom_emojis when not logged in (#22326) --- app/javascript/mastodon/containers/mastodon.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index 724719f74f..002b71e93d 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,