diff --git a/app/javascript/mastodon/features/account_gallery/index.tsx b/app/javascript/mastodon/features/account_gallery/index.tsx index a4111001ab9..572ea7be822 100644 --- a/app/javascript/mastodon/features/account_gallery/index.tsx +++ b/app/javascript/mastodon/features/account_gallery/index.tsx @@ -73,9 +73,10 @@ const selectGalleryTimeline = createAppSelector( if (isList(statusIds)) { for (const statusId of statusIds) { const status = statuses.get(statusId); + if (!status) continue; items = items.concat( ( - status?.get('media_attachments') as ImmutableList + status.get('media_attachments') as ImmutableList ).map((media) => media.set('status', status)), ); }