From 00cd311c7d3fc7c3c8406b826bfc0cfcceb289b5 Mon Sep 17 00:00:00 2001 From: Naomi Ahmed Date: Tue, 27 Dec 2022 23:52:59 +0000 Subject: [PATCH] Fix emojis crashing when it's not found --- .../src/server/api/endpoints/compatibility/instance-info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts b/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts index 825119120e..40f83a5f0a 100644 --- a/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts +++ b/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts @@ -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}`,