Fix notification screen crashing in rare cases where the status no longer exists (#31403)
This commit is contained in:
parent
6bd7da72e9
commit
0d85a79f19
5 changed files with 15 additions and 9 deletions
|
@ -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'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue