about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/util
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-06-09 11:55:07 +0200
committerThibaut Girka <thib@sitedethib.com>2020-06-09 11:55:07 +0200
commite9d7ca7645fc37534df1222e8d7ab8f3d533b852 (patch)
tree88a408a943aa421a6ba844d309f673150cd92434 /app/javascript/flavours/glitch/util
parentb826e504b4d9661fca0fa5670523e4931cefc7f4 (diff)
[Glitch] Fix WebUI crash when loading account data before page is loaded
Diffstat (limited to 'app/javascript/flavours/glitch/util')
-rw-r--r--app/javascript/flavours/glitch/util/emoji/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/util/emoji/index.js b/app/javascript/flavours/glitch/util/emoji/index.js
index bd3c083e3..22b657b05 100644
--- a/app/javascript/flavours/glitch/util/emoji/index.js
+++ b/app/javascript/flavours/glitch/util/emoji/index.js
@@ -11,7 +11,7 @@ const darkEmoji = 'πŸŽ±πŸœβš«πŸ–€β¬›β—ΌοΈβ—Ύβ—ΌοΈβœ’οΈβ–ͺοΈπŸ’£πŸŽ³πŸ“·πŸ“Έ
 const lightEmoji = 'πŸ‘½βšΎπŸ”β˜οΈπŸ’¨πŸ•ŠοΈπŸ‘€πŸ₯πŸ‘»πŸβ•β”β›ΈοΈπŸŒ©οΈπŸ”ŠπŸ”‡πŸ“ƒπŸŒ§οΈπŸπŸšπŸ™πŸ“πŸ‘πŸ’€β˜ οΈπŸŒ¨οΈπŸ”‰πŸ”ˆπŸ’¬πŸ’­πŸπŸ³οΈβšͺβ¬œβ—½β—»οΈβ–«οΈ';
 
 const emojiFilename = (filename, match) => {
-  const borderedEmoji = document.body.classList.contains('skin-mastodon-light') ? lightEmoji : darkEmoji;
+  const borderedEmoji = (document.body && document.body.classList.contains('skin-mastodon-light')) ? lightEmoji : darkEmoji;
   return borderedEmoji.includes(match) ? (filename + '_border') : filename;
 };