fix(nuxt): use fullPath instead of empty string in router hmr (#30500)

This commit is contained in:
Vuk Marjanovic 2025-01-11 22:12:31 +01:00 committed by Daniel Roe
parent af243c80f8
commit 608830e130
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -632,7 +632,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)