From f56a4efd1e18b17521788ed22228cfa0575cd379 Mon Sep 17 00:00:00 2001 From: Natty Date: Tue, 28 Jan 2025 21:03:50 +0100 Subject: [PATCH] Frontend: Fixed lookup of local users by URL opening null --- fe_calckey/frontend/client/src/scripts/search.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fe_calckey/frontend/client/src/scripts/search.ts b/fe_calckey/frontend/client/src/scripts/search.ts index e59e0e9..04dc570 100644 --- a/fe_calckey/frontend/client/src/scripts/search.ts +++ b/fe_calckey/frontend/client/src/scripts/search.ts @@ -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}`); }