diff --git a/src/runtime/plugins/documentDriven.ts b/src/runtime/plugins/documentDriven.ts index 5b3084c28..828902974 100644 --- a/src/runtime/plugins/documentDriven.ts +++ b/src/runtime/plugins/documentDriven.ts @@ -249,9 +249,11 @@ export default defineNuxtPlugin((nuxt) => { } // Route middleware - addRouteMiddleware(async (to) => { + addRouteMiddleware(async (to, from) => { // TODO: Remove this (https://github.com/nuxt/framework/pull/5274) if (to.path.includes('favicon.ico')) { return } + // Avoid calling on hash change + if (process.client && to.path === from.path) { return } const redirect = await refresh(to, false)