NuxtN
Nuxt14mo ago
David

Calling `useRoute` within middleware may lead to misleading results

Hello I'm creating a documention with nuxt content and I'm using the following middleware :
export default defineNuxtRouteMiddleware(async (to) => {})


So, an empty middleware, it throw the following warning :
[nuxt] Calling `useRoute` within middleware may lead to misleading results. Instead, use the (to, from) arguments passed to the middleware to access the new and old routes.
Was this page helpful?