mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
[Glitch] Fix notification screen crashing in rare cases where the status no longer exists
Port 0d85a79f19 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -47,7 +47,7 @@ function dispatchAssociatedRecords(
|
||||
fetchedAccounts.push(notification.moderation_warning.target_account);
|
||||
}
|
||||
|
||||
if ('status' in notification) {
|
||||
if ('status' in notification && notification.status) {
|
||||
fetchedStatuses.push(notification.status);
|
||||
}
|
||||
});
|
||||
@@ -119,7 +119,7 @@ export const processNewNotificationForGroups = createAppAsyncThunk(
|
||||
|
||||
if (
|
||||
(notification.type === 'mention' || notification.type === 'update') &&
|
||||
notification.status.filtered
|
||||
notification.status?.filtered
|
||||
) {
|
||||
const filters = notification.status.filtered.filter((result) =>
|
||||
result.filter.context.includes('notifications'),
|
||||
|
||||
Reference in New Issue
Block a user