diff options
author | ThibG <thib@sitedethib.com> | 2020-06-09 20:53:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 20:53:20 +0200 |
commit | cc6b8a96155a26f3ac0e51f41b1a00bd533fbb76 (patch) | |
tree | 1f60d34c6105f3c936f6d0990d5005e5c1f8ada5 /app/javascript | |
parent | 6b6a9d0ea362f4e301b56ae817f6c5d1761234b6 (diff) |
Fix WebUI crash when processing accounts before page is loaded (#14015)
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/features/emoji/emoji.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/emoji/emoji.js b/app/javascript/mastodon/features/emoji/emoji.js index 382ba683f..7bcda63eb 100644 --- a/app/javascript/mastodon/features/emoji/emoji.js +++ b/app/javascript/mastodon/features/emoji/emoji.js @@ -11,7 +11,7 @@ const darkEmoji = 'π±πβ«π€β¬βΌοΈβΎβΌοΈβοΈβͺοΈπ£π³π·πΈ const lightEmoji = 'π½βΎπβοΈπ¨ποΈππ₯π»πβββΈοΈπ©οΈππππ§οΈππππππβ οΈπ¨οΈπππ¬πππ³οΈβͺβ¬β½β»οΈβ«οΈ'; const emojiFilename = (filename, match) => { - const borderedEmoji = document.body.classList.contains('theme-mastodon-light') ? lightEmoji : darkEmoji; + const borderedEmoji = (document.body && document.body.classList.contains('theme-mastodon-light')) ? lightEmoji : darkEmoji; return borderedEmoji.includes(match) ? (filename + '_border') : filename; }; |