0
0
Fork 0

Fix notifications about deleted reports not being also deleted (#19475)

* Fix notifications about deleted reports not being also deleted

* Fix notification with empty report crashing web UI

Fix #18909
This commit is contained in:
Eugen Rochko 2022-10-27 02:10:54 +02:00 committed by GitHub
parent f6bcf86caf
commit d2eb726962
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -372,6 +372,10 @@ class Notification extends ImmutablePureComponent {
renderAdminReport (notification, account, link) {
const { intl, unread, report } = this.props;
if (!report) {
return null;
}
const targetAccount = report.get('target_account');
const targetDisplayNameHtml = { __html: targetAccount.get('display_name_html') };
const targetLink = <bdi><Permalink className='notification__display-name' href={targetAccount.get('url')} title={targetAccount.get('acct')} to={`/@${targetAccount.get('acct')}`} dangerouslySetInnerHTML={targetDisplayNameHtml} /></bdi>;