From da9a0b1da7c4cd814ee47b0166c42e14d393cbc4 Mon Sep 17 00:00:00 2001 From: Vuk Marjanovic <71182200+vmrjnvc@users.noreply.github.com> Date: Sat, 11 Jan 2025 22:12:31 +0100 Subject: [PATCH] fix(nuxt): use `fullPath` instead of empty string in router hmr (#30500) --- packages/nuxt/src/pages/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/pages/module.ts b/packages/nuxt/src/pages/module.ts index b5b7d1b0ac..cfb390f1d6 100644 --- a/packages/nuxt/src/pages/module.ts +++ b/packages/nuxt/src/pages/module.ts @@ -642,7 +642,7 @@ if (import.meta.hot) { for (const route of routes) { router.addRoute(route) } - router.replace('') + router.replace(router.currentRoute.value.fullPath) } if (routes && 'then' in routes) { routes.then(addRoutes)