diff --git a/src/router.js b/src/router.js index ea51d1a..e8bd1e6 100644 --- a/src/router.js +++ b/src/router.js @@ -156,7 +156,10 @@ router.beforeEach(async (to, from, next) => { next({ path: normalizedToPath, query: to.query, hash: to.hash, replace: true }); return; } - next({ ...to, replace: true }); + // Wichtig: nicht `...to` übernehmen, da `to` beim Initial-Load ggf. bereits + // auf der Catch-All-Route gematcht wurde. Dann würde der NotFound-Match + // trotz inzwischen geladener Menüroute "kleben" bleiben. + next({ path: normalizedToPath, query: to.query, hash: to.hash, replace: true }); } else { // Sicherstellen, dass Kernrouten immer verfügbar sind ensureCoreRoutes();