From ec0faf7e7fb09c680322e1d3778acc93b67af97b Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sat, 20 Mar 2021 17:51:38 +0100 Subject: [PATCH] Gracefully check reply accounts --- src/components/Timeline/Default.tsx | 4 ++-- src/components/Timeline/Notifications.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Timeline/Default.tsx b/src/components/Timeline/Default.tsx index 278cf8c9..0c8f5c39 100644 --- a/src/components/Timeline/Default.tsx +++ b/src/components/Timeline/Default.tsx @@ -141,8 +141,8 @@ const TimelineDefault: React.FC = ({ ([actualStatus.account] as Mastodon.Account[] & Mastodon.Mention[]) .concat(actualStatus.mentions) .filter(d => d?.id !== instanceAccount?.id), - d => d.id - ).map(d => d.acct)} + d => d?.id + ).map(d => d?.acct)} reblog={item.reblog ? true : false} /> )} diff --git a/src/components/Timeline/Notifications.tsx b/src/components/Timeline/Notifications.tsx index 587ed240..76420b21 100644 --- a/src/components/Timeline/Notifications.tsx +++ b/src/components/Timeline/Notifications.tsx @@ -138,9 +138,9 @@ const TimelineNotifications: React.FC = ({ ([notification.status.account] as Mastodon.Account[] & Mastodon.Mention[]) .concat(notification.status.mentions) - .filter(d => d.id !== instanceAccount?.id), - d => d.id - ).map(d => d.acct)} + .filter(d => d?.id !== instanceAccount?.id), + d => d?.id + ).map(d => d?.acct)} reblog={false} /> ) : null}