From 9899cd0661bb2a37540950119d422a0252e93a0a Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 14 Dec 2022 13:42:40 +0000 Subject: [PATCH] fix: for accounts missing `@`, perform search resolves #424 --- middleware/permalink.global.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/permalink.global.ts b/middleware/permalink.global.ts index d9f621a0..a8e27956 100644 --- a/middleware/permalink.global.ts +++ b/middleware/permalink.global.ts @@ -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)