Fix emojis crashing when it's not found

This commit is contained in:
Naomi Ahmed 2022-12-27 23:52:59 +00:00
parent ed9daf32e8
commit 1fd147d054

View File

@ -181,7 +181,7 @@ const getContact = async (
following_count: user.followingCount,
statuses_count: user.notesCount,
last_status_at: user.lastActiveDate?.toISOString(),
emojis: emojis ? user.emojis.map(e => ({
emojis: emojis ? user.emojis.filter(e => e in emojis).map(e => ({
shortcode: e,
static_url: `${config.url}/files/${emojis[e].publicUrl}`,
url: `${config.url}/files/${emojis[e].publicUrl}`,