0
0
Fork 0

Fix notification screen crashing in rare cases where the status no longer exists (#31403)

This commit is contained in:
Renaud Chaput 2024-08-14 08:47:15 +02:00 committed by GitHub
parent 6bd7da72e9
commit 0d85a79f19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 9 deletions

View file

@ -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'),