about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-12-15 14:07:34 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-12-15 20:46:21 +0100
commit1e8aff072a7e7d356ee3a1894c6b74966d8e11af (patch)
tree6c35d23fe6320f617f9e0c23237f86ae404a2b69 /app
parentb70c2e2167d60dd23a4c5011cce3112127a2616c (diff)
[Glitch] Fix wasteful request to /api/v1/custom_emojis when not logged in
Port 1f762f4271685e30373b15a2e204f8edff59d349 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app')
-rw-r--r--app/javascript/flavours/glitch/containers/mastodon.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/containers/mastodon.js b/app/javascript/flavours/glitch/containers/mastodon.js
index 6c92376d8..dd7623a81 100644
--- a/app/javascript/flavours/glitch/containers/mastodon.js
+++ b/app/javascript/flavours/glitch/containers/mastodon.js
@@ -27,8 +27,9 @@ store.dispatch(hydrateAction);
 // check for deprecated local settings
 store.dispatch(checkDeprecatedLocalSettings());
 
-// load custom emojis
-store.dispatch(fetchCustomEmojis());
+if (initialState.meta.me) {
+  store.dispatch(fetchCustomEmojis());
+}
 
 const createIdentityContext = state => ({
   signedIn: !!state.meta.me,