fix: handle no acct string
This commit is contained in:
parent
abe6af40f3
commit
34dc2f7736
2 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ export function fetchAccountById(id?: string | null): Promise<Account | null> {
|
|||
const uri = currentInstance.value?.uri
|
||||
const promise = useMasto().accounts.fetch(id)
|
||||
.then((r) => {
|
||||
if (!r.acct.includes('@') && uri)
|
||||
if (r.acct && !r.acct.includes('@') && uri)
|
||||
r.acct = `${r.acct}@${uri}`
|
||||
|
||||
cacheAccount(r, server, true)
|
||||
|
@ -63,7 +63,7 @@ export async function fetchAccountByHandle(acct: string): Promise<Account> {
|
|||
const uri = currentInstance.value?.uri
|
||||
const account = useMasto().accounts.lookup({ acct })
|
||||
.then((r) => {
|
||||
if (!r.acct.includes('@') && uri)
|
||||
if (r.acct && !r.acct.includes('@') && uri)
|
||||
r.acct = `${r.acct}@${uri}`
|
||||
|
||||
cacheAccount(r, server, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue