findAccountByUsername: safely check account?.acct

This commit is contained in:
Alex Gleason 2022-08-31 10:18:13 -05:00
parent b7abb11ca2
commit b67c454144
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
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();
}); });
}; };