From b67c4541444b673cf236c30be09d8a712ffe3561 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 31 Aug 2022 10:18:13 -0500 Subject: [PATCH] findAccountByUsername: safely check account?.acct --- app/soapbox/selectors/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/selectors/index.ts b/app/soapbox/selectors/index.ts index 2a026afe15..84165fc98b 100644 --- a/app/soapbox/selectors/index.ts +++ b/app/soapbox/selectors/index.ts @@ -59,7 +59,7 @@ const findAccountsByUsername = (state: RootState, username: string) => { const accounts = state.accounts; return accounts.filter(account => { - return username.toLowerCase() === account.acct.toLowerCase(); + return username.toLowerCase() === account?.acct.toLowerCase(); }); };