1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-04 16:09:59 +00:00

fix: for accounts missing @, perform search

resolves #424
This commit is contained in:
Daniel Roe 2022-12-14 13:42:40 +00:00
parent 48f9e71d83
commit 9899cd0661
No known key found for this signature in database
GPG key ID: 22D5008E4F5D9B55

View file

@ -38,7 +38,7 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
try {
// If we're already on an account page, we can search for this on the new instance
if (to.params.account) {
if (to.params.account && to.params.account.includes('@')) {
const account = await fetchAccountByHandle(to.params.account as string)
if (account)
return getAccountRoute(account)