Merge branch 'fix-page-crashes' into 'develop'

findAccountByUsername: safely check account?.acct

See merge request soapbox-pub/soapbox-fe!1760
This commit is contained in:
Alex Gleason 2022-09-01 22:41:47 +00:00
commit 09e86eda97
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ const findAccountsByUsername = (state: RootState, username: string) => {
const accounts = state.accounts; const accounts = state.accounts;
return accounts.filter(account => { return accounts.filter(account => {
return username.toLowerCase() === account.acct.toLowerCase(); return username.toLowerCase() === account?.acct.toLowerCase();
}); });
}; };