From ce27c6502bc439acda8ad89a4c5386698dbf82c0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 27 Oct 2022 02:10:54 +0200 Subject: [PATCH] [Glitch] Fix notifications about deleted reports not being also deleted Port d2eb726962187226c85ef7f2ee1886cb0767bbd1 to glitch-soc Signed-off-by: Claire --- .../glitch/features/notifications/components/admin_report.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/javascript/flavours/glitch/features/notifications/components/admin_report.js b/app/javascript/flavours/glitch/features/notifications/components/admin_report.js index 80beeb9da..4662bd953 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/admin_report.js +++ b/app/javascript/flavours/glitch/features/notifications/components/admin_report.js @@ -69,6 +69,10 @@ export default class AdminReport extends ImmutablePureComponent { render () { const { intl, account, notification, unread, report } = this.props; + if (!report) { + return null; + } + // Links to the display name. const displayName = account.get('display_name_html') || account.get('username'); const link = (