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:
commit
09e86eda97
|
@ -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();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue