fix a rare bug when opening accounts
This commit is contained in:
parent
3e54134c30
commit
ba49d0cf6a
|
@ -44,10 +44,10 @@ export class ToolsService {
|
||||||
.then((result: Results) => {
|
.then((result: Results) => {
|
||||||
if(accountName[0] === '@') accountName = accountName.substr(1);
|
if(accountName[0] === '@') accountName = accountName.substr(1);
|
||||||
|
|
||||||
const foundAccount = result.accounts.filter(
|
const foundAccount = result.accounts.find(
|
||||||
x => x.acct.toLowerCase() === accountName.toLowerCase()
|
x => x.acct.toLowerCase() === accountName.toLowerCase()
|
||||||
|| x.acct.toLowerCase() === accountName.toLowerCase().split('@')[0]
|
|| x.acct.toLowerCase().split('@')[0] === accountName.toLowerCase().split('@')[0]
|
||||||
)[0];
|
);
|
||||||
return foundAccount;
|
return foundAccount;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue