Fix WebUI crash when processing accounts before page is loaded (#14015)

master
ThibG 5 years ago committed by GitHub
parent 6b6a9d0ea3
commit cc6b8a9615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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;
};

Loading…
Cancel
Save