Frontend: Fixed lookup of local users by URL opening null

This commit is contained in:
Natty 2025-01-28 21:03:50 +01:00
parent 657fa1f5bb
commit f56a4efd1e
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 5 additions and 1 deletions

View File

@ -53,7 +53,11 @@ export async function search() {
const res = await promise;
if (res.type === "User") {
mainRouter.push(`/@${res.object.username}@${res.object.host}`);
mainRouter.push(
`/@${res.object.username}` + res.object.host
? `@${res.object.host}`
: ""
);
} else if (res.type === "Note") {
mainRouter.push(`/notes/${res.object.id}`);
}