[Glitch] Fix WebUI crash when loading account data before page is loaded

th-downstream
Thibaut Girka 4 years ago
parent 6f24f8c363
commit 86a8a599c2

@ -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;
};

Loading…
Cancel
Save