Skip to content

Commit

Permalink
Do not redirect Default, unless configured
Browse files Browse the repository at this point in the history
  • Loading branch information
wkramer committed Dec 13, 2023
1 parent 8f2051a commit 34e345f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const routesBase: Readonly<RouteRecordRaw[]> = [
{
path: '/',
name: 'Default',
redirect: 'About',
component: AboutView,
},
{
path: '/about',
Expand Down Expand Up @@ -222,11 +222,8 @@ router.beforeEach(async (to, from) => {
routesAreInitialized = true
if (redirect) {
return redirect
} else if (to.path === '/about' && from.path === '/') {
return from
} else {
return to
}
return to
}
to.params = defaultRouteParams(to)
return
Expand Down

0 comments on commit 34e345f

Please sign in to comment.